diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Any.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Any.cs new file mode 100644 index 000000000000..201d8b7f51f3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Any object + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Any object + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + + } + /// Any object + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Any.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..c09198e2b878 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Any.json.cs @@ -0,0 +1,106 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Any object + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api10/ErrorAdditionalInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api10/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..c3319b37105b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api10/ErrorAdditionalInfo.cs @@ -0,0 +1,74 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny _info; + + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Any()); } + + /// Internal Acessors for Info + 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;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type; + + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ErrorAdditionalInfo() + { + + } + } + /// The resource management error additional info. + public partial interface IErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The additional info.", + SerializedName = @"info", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny Info { get; } + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The additional info type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The resource management error additional info. + internal partial interface IErrorAdditionalInfoInternal + + { + /// The additional info. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny Info { get; set; } + /// The additional info type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api10/ErrorAdditionalInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api10/ErrorAdditionalInfo.json.cs new file mode 100644 index 000000000000..72b81d5c97df --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api10/ErrorAdditionalInfo.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Any.FromJson(__jsonInfo) : Info;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupGoalFeatureSupportRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupGoalFeatureSupportRequest.cs new file mode 100644 index 000000000000..062292c90801 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupGoalFeatureSupportRequest.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure backup goal feature specific request. + public partial class AzureBackupGoalFeatureSupportRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupGoalFeatureSupportRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupGoalFeatureSupportRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest __featureSupportRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FeatureSupportRequest(); + + /// backup support feature type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FeatureType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequestInternal)__featureSupportRequest).FeatureType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequestInternal)__featureSupportRequest).FeatureType = value ; } + + /// Creates an new instance. + public AzureBackupGoalFeatureSupportRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__featureSupportRequest), __featureSupportRequest); + await eventListener.AssertObjectIsValid(nameof(__featureSupportRequest), __featureSupportRequest); + } + } + /// Azure backup goal feature specific request. + public partial interface IAzureBackupGoalFeatureSupportRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest + { + + } + /// Azure backup goal feature specific request. + internal partial interface IAzureBackupGoalFeatureSupportRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequestInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupGoalFeatureSupportRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupGoalFeatureSupportRequest.json.cs new file mode 100644 index 000000000000..a37612121485 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupGoalFeatureSupportRequest.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure backup goal feature specific request. + public partial class AzureBackupGoalFeatureSupportRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureBackupGoalFeatureSupportRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __featureSupportRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FeatureSupportRequest(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupGoalFeatureSupportRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupGoalFeatureSupportRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupGoalFeatureSupportRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureBackupGoalFeatureSupportRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __featureSupportRequest?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerContainer.cs new file mode 100644 index 000000000000..c6efc9f54134 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerContainer.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureBackupServer (DPMVenus) workload-specific protection container. + public partial class AzureBackupServerContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainer __dpmContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Specifies whether the container is re-registrable. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? CanReRegister { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).CanReRegister; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).CanReRegister = value ?? default(bool); } + + /// ID of container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ContainerId = value ?? null; } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).ContainerType = value ; } + + /// Backup engine Agent version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DpmAgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).DpmAgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).DpmAgentVersion = value ?? null; } + + /// List of BackupEngines protecting the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] DpmServer { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).DpmServer; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).DpmServer = value ?? null /* arrayOf */; } + + /// Extended Info of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ExtendedInfo = value ?? null /* model class */; } + + /// Last refresh time of the DPMContainer. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoLastRefreshedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ExtendedInfoLastRefreshedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ExtendedInfoLastRefreshedAt = value ?? default(global::System.DateTime); } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).HealthStatus = value ?? null; } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).ProtectableObjectType = value ?? null; } + + /// Number of protected items in the BackupEngine + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public long? ProtectedItemCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ProtectedItemCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ProtectedItemCount = value ?? default(long); } + + /// Protection status of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ProtectionStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).ProtectionStatus = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__dpmContainer).RegistrationStatus = value ?? null; } + + /// To check if upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? UpgradeAvailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).UpgradeAvailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal)__dpmContainer).UpgradeAvailable = value ?? default(bool); } + + /// Creates an new instance. + public AzureBackupServerContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__dpmContainer), __dpmContainer); + await eventListener.AssertObjectIsValid(nameof(__dpmContainer), __dpmContainer); + } + } + /// AzureBackupServer (DPMVenus) workload-specific protection container. + public partial interface IAzureBackupServerContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainer + { + + } + /// AzureBackupServer (DPMVenus) workload-specific protection container. + internal partial interface IAzureBackupServerContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerContainer.json.cs new file mode 100644 index 000000000000..5207d0bfc7e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerContainer.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureBackupServer (DPMVenus) workload-specific protection container. + public partial class AzureBackupServerContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureBackupServerContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __dpmContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmContainer(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerContainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureBackupServerContainer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __dpmContainer?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerEngine.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerEngine.cs new file mode 100644 index 000000000000..a8d96ec1961e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerEngine.cs @@ -0,0 +1,139 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup engine type when Azure Backup Server is used to manage the backups. + public partial class AzureBackupServerEngine : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerEngine, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerEngineInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase __backupEngineBase = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBase(); + + /// Backup agent version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string AzureBackupAgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).AzureBackupAgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).AzureBackupAgentVersion = value ?? null; } + + /// ID of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupEngineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineId = value ?? null; } + + /// + /// Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupEngineState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineState = value ?? null; } + + /// Type of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType BackupEngineType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineType = value ; } + + /// Type of backup management for the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Flag indicating if the backup engine be registered, once already registered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? CanReRegister { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).CanReRegister; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).CanReRegister = value ?? default(bool); } + + /// Backup engine version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DpmVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).DpmVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).DpmVersion = value ?? null; } + + /// Extended info of the backupengine + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfo = value ?? null /* model class */; } + + /// Disk space currently available in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public double? ExtendedInfoAvailableDiskSpace { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoAvailableDiskSpace; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoAvailableDiskSpace = value ?? default(double); } + + /// Protected instances in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoAzureProtectedInstance { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoAzureProtectedInstance; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoAzureProtectedInstance = value ?? default(int); } + + /// Database name of backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoDatabaseName = value ?? null; } + + /// Number of disks in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoDiskCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoDiskCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoDiskCount = value ?? default(int); } + + /// Number of protected items in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoProtectedItemsCount = value ?? default(int); } + + /// Number of protected servers in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoProtectedServersCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoProtectedServersCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoProtectedServersCount = value ?? default(int); } + + /// Last refresh time in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoRefreshedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoRefreshedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoRefreshedAt = value ?? default(global::System.DateTime); } + + /// Disk space used in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public double? ExtendedInfoUsedDiskSpace { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoUsedDiskSpace; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoUsedDiskSpace = value ?? default(double); } + + /// Friendly name of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).FriendlyName = value ?? null; } + + /// Backup status of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).HealthStatus = value ?? null; } + + /// To check if backup agent upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAzureBackupAgentUpgradeAvailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).IsAzureBackupAgentUpgradeAvailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).IsAzureBackupAgentUpgradeAvailable = value ?? default(bool); } + + /// To check if backup engine upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDpmUpgradeAvailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).IsDpmUpgradeAvailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).IsDpmUpgradeAvailable = value ?? default(bool); } + + /// Registration status of the backup engine with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).RegistrationStatus = value ?? null; } + + /// Creates an new instance. + public AzureBackupServerEngine() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__backupEngineBase), __backupEngineBase); + await eventListener.AssertObjectIsValid(nameof(__backupEngineBase), __backupEngineBase); + } + } + /// Backup engine type when Azure Backup Server is used to manage the backups. + public partial interface IAzureBackupServerEngine : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase + { + + } + /// Backup engine type when Azure Backup Server is used to manage the backups. + internal partial interface IAzureBackupServerEngineInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerEngine.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerEngine.json.cs new file mode 100644 index 000000000000..dccbe653c5d7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureBackupServerEngine.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup engine type when Azure Backup Server is used to manage the backups. + public partial class AzureBackupServerEngine + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureBackupServerEngine(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __backupEngineBase = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBase(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerEngine. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerEngine. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureBackupServerEngine FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureBackupServerEngine(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __backupEngineBase?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareBackupRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareBackupRequest.cs new file mode 100644 index 000000000000..564f507e62d9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareBackupRequest.cs @@ -0,0 +1,76 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureFileShare workload-specific backup request. + public partial class AzureFileShareBackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareBackupRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareBackupRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest __backupRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupRequest(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal)__backupRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal)__backupRequest).ObjectType = value ; } + + /// Backing field for property. + private global::System.DateTime? _recoveryPointExpiryTimeInUtc; + + /// Backup copy will expire after the time specified (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? RecoveryPointExpiryTimeInUtc { get => this._recoveryPointExpiryTimeInUtc; set => this._recoveryPointExpiryTimeInUtc = value; } + + /// Creates an new instance. + public AzureFileShareBackupRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__backupRequest), __backupRequest); + await eventListener.AssertObjectIsValid(nameof(__backupRequest), __backupRequest); + } + } + /// AzureFileShare workload-specific backup request. + public partial interface IAzureFileShareBackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest + { + /// Backup copy will expire after the time specified (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup copy will expire after the time specified (UTC).", + SerializedName = @"recoveryPointExpiryTimeInUTC", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RecoveryPointExpiryTimeInUtc { get; set; } + + } + /// AzureFileShare workload-specific backup request. + internal partial interface IAzureFileShareBackupRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal + { + /// Backup copy will expire after the time specified (UTC). + global::System.DateTime? RecoveryPointExpiryTimeInUtc { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareBackupRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareBackupRequest.json.cs new file mode 100644 index 000000000000..54aaa5831ef0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareBackupRequest.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureFileShare workload-specific backup request. + public partial class AzureFileShareBackupRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFileShareBackupRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __backupRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupRequest(json); + {_recoveryPointExpiryTimeInUtc = If( json?.PropertyT("recoveryPointExpiryTimeInUTC"), out var __jsonRecoveryPointExpiryTimeInUtc) ? global::System.DateTime.TryParse((string)__jsonRecoveryPointExpiryTimeInUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRecoveryPointExpiryTimeInUtcValue) ? __jsonRecoveryPointExpiryTimeInUtcValue : RecoveryPointExpiryTimeInUtc : RecoveryPointExpiryTimeInUtc;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareBackupRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareBackupRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareBackupRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureFileShareBackupRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __backupRequest?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointExpiryTimeInUtc ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointExpiryTimeInUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "recoveryPointExpiryTimeInUTC" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectableItem.cs new file mode 100644 index 000000000000..73534e888303 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectableItem.cs @@ -0,0 +1,130 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Protectable item for Azure Fileshare workloads. + public partial class AzureFileShareProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem __workloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItem(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType? _azureFileShareType; + + /// File Share type XSync or XSMB. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType? AzureFileShareType { get => this._azureFileShareType; set => this._azureFileShareType = value; } + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).FriendlyName = value ?? null; } + + /// Backing field for property. + private string _parentContainerFabricId; + + /// + /// Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ParentContainerFabricId { get => this._parentContainerFabricId; set => this._parentContainerFabricId = value; } + + /// Backing field for property. + private string _parentContainerFriendlyName; + + /// Friendly name of container to which this protectable item belongs. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ParentContainerFriendlyName { get => this._parentContainerFriendlyName; set => this._parentContainerFriendlyName = value; } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).WorkloadType = value ?? null; } + + /// Creates an new instance. + public AzureFileShareProtectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__workloadProtectableItem), __workloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__workloadProtectableItem), __workloadProtectableItem); + } + } + /// Protectable item for Azure Fileshare workloads. + public partial interface IAzureFileShareProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem + { + /// File Share type XSync or XSMB. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"File Share type XSync or XSMB.", + SerializedName = @"azureFileShareType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType? AzureFileShareType { get; set; } + /// + /// Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Full Fabric ID of container to which this protectable item belongs. For example, ARM ID.", + SerializedName = @"parentContainerFabricId", + PossibleTypes = new [] { typeof(string) })] + string ParentContainerFabricId { get; set; } + /// Friendly name of container to which this protectable item belongs. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of container to which this protectable item belongs.", + SerializedName = @"parentContainerFriendlyName", + PossibleTypes = new [] { typeof(string) })] + string ParentContainerFriendlyName { get; set; } + + } + /// Protectable item for Azure Fileshare workloads. + internal partial interface IAzureFileShareProtectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal + { + /// File Share type XSync or XSMB. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType? AzureFileShareType { get; set; } + /// + /// Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. + /// + string ParentContainerFabricId { get; set; } + /// Friendly name of container to which this protectable item belongs. + string ParentContainerFriendlyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectableItem.json.cs new file mode 100644 index 000000000000..9095ebbd8420 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectableItem.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Protectable item for Azure Fileshare workloads. + public partial class AzureFileShareProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFileShareProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __workloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItem(json); + {_parentContainerFabricId = If( json?.PropertyT("parentContainerFabricId"), out var __jsonParentContainerFabricId) ? (string)__jsonParentContainerFabricId : (string)ParentContainerFabricId;} + {_parentContainerFriendlyName = If( json?.PropertyT("parentContainerFriendlyName"), out var __jsonParentContainerFriendlyName) ? (string)__jsonParentContainerFriendlyName : (string)ParentContainerFriendlyName;} + {_azureFileShareType = If( json?.PropertyT("azureFileShareType"), out var __jsonAzureFileShareType) ? (string)__jsonAzureFileShareType : (string)AzureFileShareType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureFileShareProtectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __workloadProtectableItem?.ToJson(container, serializationMode); + AddIf( null != (((object)this._parentContainerFabricId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._parentContainerFabricId.ToString()) : null, "parentContainerFabricId" ,container.Add ); + AddIf( null != (((object)this._parentContainerFriendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._parentContainerFriendlyName.ToString()) : null, "parentContainerFriendlyName" ,container.Add ); + AddIf( null != (((object)this._azureFileShareType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._azureFileShareType.ToString()) : null, "azureFileShareType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectionPolicy.cs new file mode 100644 index 000000000000..8966623ebc70 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectionPolicy.cs @@ -0,0 +1,221 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureStorage backup policy. + public partial class AzureFileShareProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectionPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType = value ; } + + /// Internal Acessors for RetentionPolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectionPolicyInternal.RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set { {_retentionPolicy = value;} } } + + /// Internal Acessors for SchedulePolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectionPolicyInternal.SchedulePolicy { get => (this._schedulePolicy = this._schedulePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy()); set { {_schedulePolicy = value;} } } + + /// Internal Acessors for VaultRetentionPolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectionPolicyInternal.VaultRetentionPolicy { get => (this._vaultRetentionPolicy = this._vaultRetentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultRetentionPolicy()); set { {_vaultRetentionPolicy = value;} } } + + /// Internal Acessors for VaultRetentionPolicyVaultRetention + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectionPolicyInternal.VaultRetentionPolicyVaultRetention { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicyInternal)VaultRetentionPolicy).VaultRetention; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicyInternal)VaultRetentionPolicy).VaultRetention = value; } + + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount = value ?? default(int); } + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy _retentionPolicy; + + /// Retention policy with the details on backup copy retention ranges. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set => this._retentionPolicy = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RetentionPolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy _schedulePolicy; + + /// Backup schedule specified as part of backup policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy SchedulePolicy { get => (this._schedulePolicy = this._schedulePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy()); set => this._schedulePolicy = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SchedulePolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)SchedulePolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)SchedulePolicy).Type = value ?? null; } + + /// Backing field for property. + private string _timeZone; + + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicy _vaultRetentionPolicy; + + /// Retention policy with the details on hardened backup copy retention ranges. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicy VaultRetentionPolicy { get => (this._vaultRetentionPolicy = this._vaultRetentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultRetentionPolicy()); set => this._vaultRetentionPolicy = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? VaultRetentionPolicySnapshotRetentionInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicyInternal)VaultRetentionPolicy).SnapshotRetentionInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicyInternal)VaultRetentionPolicy).SnapshotRetentionInDay = value ?? default(int); } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string VaultRetentionPolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicyInternal)VaultRetentionPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicyInternal)VaultRetentionPolicy).Type = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? _workLoadType; + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkLoadType { get => this._workLoadType; set => this._workLoadType = value; } + + /// Creates an new instance. + public AzureFileShareProtectionPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionPolicy), __protectionPolicy); + await eventListener.AssertObjectIsValid(nameof(__protectionPolicy), __protectionPolicy); + } + } + /// AzureStorage backup policy. + public partial interface IAzureFileShareProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"retentionPolicyType", + PossibleTypes = new [] { typeof(string) })] + string RetentionPolicyType { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"schedulePolicyType", + PossibleTypes = new [] { typeof(string) })] + string SchedulePolicyType { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"TimeZone optional input as string. For example: TimeZone = ""Pacific Standard Time"".", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"snapshotRetentionInDays", + PossibleTypes = new [] { typeof(int) })] + int? VaultRetentionPolicySnapshotRetentionInDay { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"retentionPolicyType", + PossibleTypes = new [] { typeof(string) })] + string VaultRetentionPolicyType { get; set; } + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of workload for the backup management", + SerializedName = @"workLoadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkLoadType { get; set; } + + } + /// AzureStorage backup policy. + internal partial interface IAzureFileShareProtectionPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal + { + /// Retention policy with the details on backup copy retention ranges. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string RetentionPolicyType { get; set; } + /// Backup schedule specified as part of backup policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy SchedulePolicy { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string SchedulePolicyType { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + string TimeZone { get; set; } + /// Retention policy with the details on hardened backup copy retention ranges. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicy VaultRetentionPolicy { get; set; } + + int? VaultRetentionPolicySnapshotRetentionInDay { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string VaultRetentionPolicyType { get; set; } + /// Base class for retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy VaultRetentionPolicyVaultRetention { get; set; } + /// Type of workload for the backup management + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkLoadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectionPolicy.json.cs new file mode 100644 index 000000000000..4d00e03fb16c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProtectionPolicy.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureStorage backup policy. + public partial class AzureFileShareProtectionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFileShareProtectionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(json); + {_schedulePolicy = If( json?.PropertyT("schedulePolicy"), out var __jsonSchedulePolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy.FromJson(__jsonSchedulePolicy) : SchedulePolicy;} + {_retentionPolicy = If( json?.PropertyT("retentionPolicy"), out var __jsonRetentionPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy.FromJson(__jsonRetentionPolicy) : RetentionPolicy;} + {_vaultRetentionPolicy = If( json?.PropertyT("vaultRetentionPolicy"), out var __jsonVaultRetentionPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultRetentionPolicy.FromJson(__jsonVaultRetentionPolicy) : VaultRetentionPolicy;} + {_workLoadType = If( json?.PropertyT("workLoadType"), out var __jsonWorkLoadType) ? (string)__jsonWorkLoadType : (string)WorkLoadType;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProtectionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureFileShareProtectionPolicy(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionPolicy?.ToJson(container, serializationMode); + AddIf( null != this._schedulePolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._schedulePolicy.ToJson(null,serializationMode) : null, "schedulePolicy" ,container.Add ); + AddIf( null != this._retentionPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionPolicy.ToJson(null,serializationMode) : null, "retentionPolicy" ,container.Add ); + AddIf( null != this._vaultRetentionPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._vaultRetentionPolicy.ToJson(null,serializationMode) : null, "vaultRetentionPolicy" ,container.Add ); + AddIf( null != (((object)this._workLoadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workLoadType.ToString()) : null, "workLoadType" ,container.Add ); + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProvisionIlrRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProvisionIlrRequest.cs new file mode 100644 index 000000000000..42f528c15eeb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProvisionIlrRequest.cs @@ -0,0 +1,95 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Update snapshot Uri with the correct friendly Name of the source Azure file share. + /// + public partial class AzureFileShareProvisionIlrRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProvisionIlrRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProvisionIlrRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest __ilrRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IlrRequest(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestInternal)__ilrRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestInternal)__ilrRequest).ObjectType = value ; } + + /// Backing field for property. + private string _recoveryPointId; + + /// Recovery point ID. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointId { get => this._recoveryPointId; set => this._recoveryPointId = value; } + + /// Backing field for property. + private string _sourceResourceId; + + /// Source Storage account ARM Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Creates an new instance. + public AzureFileShareProvisionIlrRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__ilrRequest), __ilrRequest); + await eventListener.AssertObjectIsValid(nameof(__ilrRequest), __ilrRequest); + } + } + /// Update snapshot Uri with the correct friendly Name of the source Azure file share. + public partial interface IAzureFileShareProvisionIlrRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest + { + /// Recovery point ID. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Recovery point ID.", + SerializedName = @"recoveryPointId", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointId { get; set; } + /// Source Storage account ARM Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Storage account ARM Id", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + + } + /// Update snapshot Uri with the correct friendly Name of the source Azure file share. + internal partial interface IAzureFileShareProvisionIlrRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestInternal + { + /// Recovery point ID. + string RecoveryPointId { get; set; } + /// Source Storage account ARM Id + string SourceResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProvisionIlrRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProvisionIlrRequest.json.cs new file mode 100644 index 000000000000..359cd14e9fd8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareProvisionIlrRequest.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Update snapshot Uri with the correct friendly Name of the source Azure file share. + /// + public partial class AzureFileShareProvisionIlrRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFileShareProvisionIlrRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __ilrRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IlrRequest(json); + {_recoveryPointId = If( json?.PropertyT("recoveryPointId"), out var __jsonRecoveryPointId) ? (string)__jsonRecoveryPointId : (string)RecoveryPointId;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProvisionIlrRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProvisionIlrRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareProvisionIlrRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureFileShareProvisionIlrRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __ilrRequest?.ToJson(container, serializationMode); + AddIf( null != (((object)this._recoveryPointId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointId.ToString()) : null, "recoveryPointId" ,container.Add ); + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRecoveryPoint.cs new file mode 100644 index 000000000000..bdd4a34521d7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRecoveryPoint.cs @@ -0,0 +1,187 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure File Share workload specific backup copy. + public partial class AzureFileShareRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRecoveryPointInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint __recoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint(); + + /// Backing field for property. + private string _fileShareSnapshotUri; + + /// Contains Url to the snapshot of fileshare, if applicable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FileShareSnapshotUri { get => this._fileShareSnapshotUri; set => this._fileShareSnapshotUri = value; } + + /// Internal Acessors for RecoveryPointProperty + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRecoveryPointInternal.RecoveryPointProperty { get => (this._recoveryPointProperty = this._recoveryPointProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties()); set { {_recoveryPointProperty = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__recoveryPoint).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__recoveryPoint).ObjectType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties _recoveryPointProperty; + + /// Properties of Recovery Point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get => (this._recoveryPointProperty = this._recoveryPointProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties()); set => this._recoveryPointProperty = value; } + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointPropertyExpiryTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).ExpiryTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).ExpiryTime = value ?? null; } + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? RecoveryPointPropertyIsSoftDeleted { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).IsSoftDeleted; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).IsSoftDeleted = value ?? default(bool); } + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointPropertyRuleName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).RuleName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).RuleName = value ?? null; } + + /// Backing field for property. + private int? _recoveryPointSizeInGb; + + /// Contains recovery point size + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? RecoveryPointSizeInGb { get => this._recoveryPointSizeInGb; set => this._recoveryPointSizeInGb = value; } + + /// Backing field for property. + private global::System.DateTime? _recoveryPointTime; + + /// Time at which this backup copy was created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? RecoveryPointTime { get => this._recoveryPointTime; set => this._recoveryPointTime = value; } + + /// Backing field for property. + private string _recoveryPointType; + + /// + /// Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointType { get => this._recoveryPointType; set => this._recoveryPointType = value; } + + /// Creates an new instance. + public AzureFileShareRecoveryPoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__recoveryPoint), __recoveryPoint); + await eventListener.AssertObjectIsValid(nameof(__recoveryPoint), __recoveryPoint); + } + } + /// Azure File Share workload specific backup copy. + public partial interface IAzureFileShareRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint + { + /// Contains Url to the snapshot of fileshare, if applicable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Contains Url to the snapshot of fileshare, if applicable", + SerializedName = @"fileShareSnapshotUri", + PossibleTypes = new [] { typeof(string) })] + string FileShareSnapshotUri { get; set; } + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Expiry time of Recovery Point in UTC.", + SerializedName = @"expiryTime", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointPropertyExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Bool to indicate whether RP is in soft delete state or not", + SerializedName = @"isSoftDeleted", + PossibleTypes = new [] { typeof(bool) })] + bool? RecoveryPointPropertyIsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rule name tagged on Recovery Point that governs life cycle", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointPropertyRuleName { get; set; } + /// Contains recovery point size + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Contains recovery point size", + SerializedName = @"recoveryPointSizeInGB", + PossibleTypes = new [] { typeof(int) })] + int? RecoveryPointSizeInGb { get; set; } + /// Time at which this backup copy was created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time at which this backup copy was created.", + SerializedName = @"recoveryPointTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RecoveryPointTime { get; set; } + /// + /// Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent.", + SerializedName = @"recoveryPointType", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointType { get; set; } + + } + /// Azure File Share workload specific backup copy. + internal partial interface IAzureFileShareRecoveryPointInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal + { + /// Contains Url to the snapshot of fileshare, if applicable + string FileShareSnapshotUri { get; set; } + /// Properties of Recovery Point + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get; set; } + /// Expiry time of Recovery Point in UTC. + string RecoveryPointPropertyExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + bool? RecoveryPointPropertyIsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + string RecoveryPointPropertyRuleName { get; set; } + /// Contains recovery point size + int? RecoveryPointSizeInGb { get; set; } + /// Time at which this backup copy was created. + global::System.DateTime? RecoveryPointTime { get; set; } + /// + /// Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. + /// + string RecoveryPointType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRecoveryPoint.json.cs new file mode 100644 index 000000000000..106604924c20 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRecoveryPoint.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure File Share workload specific backup copy. + public partial class AzureFileShareRecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFileShareRecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __recoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint(json); + {_recoveryPointProperty = If( json?.PropertyT("recoveryPointProperties"), out var __jsonRecoveryPointProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties.FromJson(__jsonRecoveryPointProperties) : RecoveryPointProperty;} + {_recoveryPointType = If( json?.PropertyT("recoveryPointType"), out var __jsonRecoveryPointType) ? (string)__jsonRecoveryPointType : (string)RecoveryPointType;} + {_recoveryPointTime = If( json?.PropertyT("recoveryPointTime"), out var __jsonRecoveryPointTime) ? global::System.DateTime.TryParse((string)__jsonRecoveryPointTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRecoveryPointTimeValue) ? __jsonRecoveryPointTimeValue : RecoveryPointTime : RecoveryPointTime;} + {_fileShareSnapshotUri = If( json?.PropertyT("fileShareSnapshotUri"), out var __jsonFileShareSnapshotUri) ? (string)__jsonFileShareSnapshotUri : (string)FileShareSnapshotUri;} + {_recoveryPointSizeInGb = If( json?.PropertyT("recoveryPointSizeInGB"), out var __jsonRecoveryPointSizeInGb) ? (int?)__jsonRecoveryPointSizeInGb : RecoveryPointSizeInGb;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRecoveryPoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureFileShareRecoveryPoint(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __recoveryPoint?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointProperty ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointProperty.ToJson(null,serializationMode) : null, "recoveryPointProperties" ,container.Add ); + AddIf( null != (((object)this._recoveryPointType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointType.ToString()) : null, "recoveryPointType" ,container.Add ); + AddIf( null != this._recoveryPointTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "recoveryPointTime" ,container.Add ); + AddIf( null != (((object)this._fileShareSnapshotUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fileShareSnapshotUri.ToString()) : null, "fileShareSnapshotUri" ,container.Add ); + AddIf( null != this._recoveryPointSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._recoveryPointSizeInGb) : null, "recoveryPointSizeInGB" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRestoreRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRestoreRequest.cs new file mode 100644 index 000000000000..c88d977f71fd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRestoreRequest.cs @@ -0,0 +1,194 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureFileShare Restore Request + public partial class AzureFileShareRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRestoreRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRestoreRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest __restoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions? _copyOption; + + /// Options to resolve copy conflicts. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions? CopyOption { get => this._copyOption; set => this._copyOption = value; } + + /// Internal Acessors for TargetDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRestoreRequestInternal.TargetDetail { get => (this._targetDetail = this._targetDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TargetAfsRestoreInfo()); set { {_targetDetail = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ObjectType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? _recoveryType; + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => this._recoveryType; set => this._recoveryType = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs[] _restoreFileSpec; + + /// + /// List of Source Files/Folders(which need to recover) and TargetFolderPath details + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs[] RestoreFileSpec { get => this._restoreFileSpec; set => this._restoreFileSpec = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType? _restoreRequestType; + + /// Restore Type (FullShareRestore or ItemLevelRestore) + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType? RestoreRequestType { get => this._restoreRequestType; set => this._restoreRequestType = value; } + + /// Backing field for property. + private string _sourceResourceId; + + /// Source storage account ARM Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfo _targetDetail; + + /// Target File Share Details + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfo TargetDetail { get => (this._targetDetail = this._targetDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TargetAfsRestoreInfo()); set => this._targetDetail = value; } + + /// File share name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string TargetDetailName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfoInternal)TargetDetail).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfoInternal)TargetDetail).Name = value ?? null; } + + /// Target file share resource ARM ID + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string TargetDetailTargetResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfoInternal)TargetDetail).TargetResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfoInternal)TargetDetail).TargetResourceId = value ?? null; } + + /// Creates an new instance. + public AzureFileShareRestoreRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__restoreRequest), __restoreRequest); + await eventListener.AssertObjectIsValid(nameof(__restoreRequest), __restoreRequest); + } + } + /// AzureFileShare Restore Request + public partial interface IAzureFileShareRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest + { + /// Options to resolve copy conflicts. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Options to resolve copy conflicts.", + SerializedName = @"copyOptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions? CopyOption { get; set; } + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of this recovery.", + SerializedName = @"recoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get; set; } + /// + /// List of Source Files/Folders(which need to recover) and TargetFolderPath details + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of Source Files/Folders(which need to recover) and TargetFolderPath details", + SerializedName = @"restoreFileSpecs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs[] RestoreFileSpec { get; set; } + /// Restore Type (FullShareRestore or ItemLevelRestore) + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Restore Type (FullShareRestore or ItemLevelRestore)", + SerializedName = @"restoreRequestType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType? RestoreRequestType { get; set; } + /// Source storage account ARM Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source storage account ARM Id", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + /// File share name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"File share name", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string TargetDetailName { get; set; } + /// Target file share resource ARM ID + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Target file share resource ARM ID", + SerializedName = @"targetResourceId", + PossibleTypes = new [] { typeof(string) })] + string TargetDetailTargetResourceId { get; set; } + + } + /// AzureFileShare Restore Request + internal partial interface IAzureFileShareRestoreRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal + { + /// Options to resolve copy conflicts. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions? CopyOption { get; set; } + /// Type of this recovery. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get; set; } + /// + /// List of Source Files/Folders(which need to recover) and TargetFolderPath details + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs[] RestoreFileSpec { get; set; } + /// Restore Type (FullShareRestore or ItemLevelRestore) + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType? RestoreRequestType { get; set; } + /// Source storage account ARM Id + string SourceResourceId { get; set; } + /// Target File Share Details + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfo TargetDetail { get; set; } + /// File share name + string TargetDetailName { get; set; } + /// Target file share resource ARM ID + string TargetDetailTargetResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRestoreRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRestoreRequest.json.cs new file mode 100644 index 000000000000..622693dde755 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileShareRestoreRequest.json.cs @@ -0,0 +1,128 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureFileShare Restore Request + public partial class AzureFileShareRestoreRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFileShareRestoreRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __restoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest(json); + {_targetDetail = If( json?.PropertyT("targetDetails"), out var __jsonTargetDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TargetAfsRestoreInfo.FromJson(__jsonTargetDetails) : TargetDetail;} + {_recoveryType = If( json?.PropertyT("recoveryType"), out var __jsonRecoveryType) ? (string)__jsonRecoveryType : (string)RecoveryType;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + {_copyOption = If( json?.PropertyT("copyOptions"), out var __jsonCopyOptions) ? (string)__jsonCopyOptions : (string)CopyOption;} + {_restoreRequestType = If( json?.PropertyT("restoreRequestType"), out var __jsonRestoreRequestType) ? (string)__jsonRestoreRequestType : (string)RestoreRequestType;} + {_restoreFileSpec = If( json?.PropertyT("restoreFileSpecs"), out var __jsonRestoreFileSpecs) ? If( __jsonRestoreFileSpecs as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreFileSpecs.FromJson(__u) )) ))() : null : RestoreFileSpec;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRestoreRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRestoreRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileShareRestoreRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureFileShareRestoreRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __restoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._targetDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._targetDetail.ToJson(null,serializationMode) : null, "targetDetails" ,container.Add ); + AddIf( null != (((object)this._recoveryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryType.ToString()) : null, "recoveryType" ,container.Add ); + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AddIf( null != (((object)this._copyOption)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._copyOption.ToString()) : null, "copyOptions" ,container.Add ); + AddIf( null != (((object)this._restoreRequestType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._restoreRequestType.ToString()) : null, "restoreRequestType" ,container.Add ); + if (null != this._restoreFileSpec) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._restoreFileSpec ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("restoreFileSpecs",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItem.cs new file mode 100644 index 000000000000..6f43ea8ded16 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItem.cs @@ -0,0 +1,336 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure File Share workload-specific backup item. + public partial class AzureFileshareProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfo _extendedInfo; + + /// Additional information with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureFileshareProtectedItemExtendedInfo()); set => this._extendedInfo = value; } + + /// The oldest backup copy available for this item in the service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoPolicyState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).PolicyState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).PolicyState = value ?? null; } + + /// Number of available backup copies associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount = value ?? default(int); } + + /// + /// Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).ResourceState; } + + /// The resource state sync time for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoResourceStateSyncTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).ResourceStateSyncTime; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the fileshare represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealths _kpisHealth; + + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealths KpisHealth { get => (this._kpisHealth = this._kpisHealth ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureFileshareProtectedItemKpisHealths()); set => this._kpisHealth = value; } + + /// Backing field for property. + private string _lastBackupStatus; + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LastBackupStatus { get => this._lastBackupStatus; set => this._lastBackupStatus = value; } + + /// Backing field for property. + private global::System.DateTime? _lastBackupTime; + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastBackupTime { get => this._lastBackupTime; set => this._lastBackupTime = value; } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureFileshareProtectedItemExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Internal Acessors for ExtendedInfoResourceState + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemInternal.ExtendedInfoResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).ResourceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).ResourceState = value; } + + /// Internal Acessors for ExtendedInfoResourceStateSyncTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemInternal.ExtendedInfoResourceStateSyncTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).ResourceStateSyncTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal)ExtendedInfo).ResourceStateSyncTime = value; } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType = value; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? _protectionState; + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// Backing field for property. + private string _protectionStatus; + + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectionStatus { get => this._protectionStatus; set => this._protectionStatus = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; } + + /// Creates an new instance. + public AzureFileshareProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectedItem), __protectedItem); + await eventListener.AssertObjectIsValid(nameof(__protectedItem), __protectedItem); + } + } + /// Azure File Share workload-specific backup item. + public partial interface IAzureFileshareProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem + { + /// The oldest backup copy available for this item in the service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this item in the service.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates consistency of policy object and policy applied to this backup item.", + SerializedName = @"policyState", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoPolicyState { get; set; } + /// Number of available backup copies associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of available backup copies associated with this backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoRecoveryPointCount { get; set; } + /// + /// Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted}", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoResourceState { get; } + /// The resource state sync time for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The resource state sync time for this backup item.", + SerializedName = @"resourceStateSyncTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoResourceStateSyncTime { get; } + /// Friendly name of the fileshare represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the fileshare represented by this backup item.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health details of different KPIs", + SerializedName = @"kpisHealths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealths) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealths KpisHealth { get; set; } + /// Last backup operation status. Possible values: Healthy, Unhealthy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last backup operation status. Possible values: Healthy, Unhealthy.", + SerializedName = @"lastBackupStatus", + PossibleTypes = new [] { typeof(string) })] + string LastBackupStatus { get; set; } + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timestamp of the last backup operation on this backup item.", + SerializedName = @"lastBackupTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastBackupTime { get; set; } + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup state of this backup item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get; set; } + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup status of this backup item.", + SerializedName = @"protectionStatus", + PossibleTypes = new [] { typeof(string) })] + string ProtectionStatus { get; set; } + + } + /// Azure File Share workload-specific backup item. + internal partial interface IAzureFileshareProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal + { + /// Additional information with this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfo ExtendedInfo { get; set; } + /// The oldest backup copy available for this item in the service. + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + string ExtendedInfoPolicyState { get; set; } + /// Number of available backup copies associated with this backup item. + int? ExtendedInfoRecoveryPointCount { get; set; } + /// + /// Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// + string ExtendedInfoResourceState { get; set; } + /// The resource state sync time for this backup item. + global::System.DateTime? ExtendedInfoResourceStateSyncTime { get; set; } + /// Friendly name of the fileshare represented by this backup item. + string FriendlyName { get; set; } + /// Health details of different KPIs + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealths KpisHealth { get; set; } + /// Last backup operation status. Possible values: Healthy, Unhealthy. + string LastBackupStatus { get; set; } + /// Timestamp of the last backup operation on this backup item. + global::System.DateTime? LastBackupTime { get; set; } + /// Backup state of this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get; set; } + /// Backup status of this backup item. + string ProtectionStatus { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItem.json.cs new file mode 100644 index 000000000000..5613bc2101a1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItem.json.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure File Share workload-specific backup item. + public partial class AzureFileshareProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFileshareProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureFileshareProtectedItemExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_protectionStatus = If( json?.PropertyT("protectionStatus"), out var __jsonProtectionStatus) ? (string)__jsonProtectionStatus : (string)ProtectionStatus;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + {_lastBackupStatus = If( json?.PropertyT("lastBackupStatus"), out var __jsonLastBackupStatus) ? (string)__jsonLastBackupStatus : (string)LastBackupStatus;} + {_lastBackupTime = If( json?.PropertyT("lastBackupTime"), out var __jsonLastBackupTime) ? global::System.DateTime.TryParse((string)__jsonLastBackupTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastBackupTimeValue) ? __jsonLastBackupTimeValue : LastBackupTime : LastBackupTime;} + {_kpisHealth = If( json?.PropertyT("kpisHealths"), out var __jsonKpisHealths) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureFileshareProtectedItemKpisHealths.FromJson(__jsonKpisHealths) : KpisHealth;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureFileshareProtectedItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectedItem?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._protectionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionStatus.ToString()) : null, "protectionStatus" ,container.Add ); + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + AddIf( null != (((object)this._lastBackupStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupStatus.ToString()) : null, "lastBackupStatus" ,container.Add ); + AddIf( null != this._lastBackupTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastBackupTime" ,container.Add ); + AddIf( null != this._kpisHealth ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._kpisHealth.ToJson(null,serializationMode) : null, "kpisHealths" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemExtendedInfo.cs new file mode 100644 index 000000000000..ccf5cd43e1e7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemExtendedInfo.cs @@ -0,0 +1,131 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information about Azure File Share backup item. + public partial class AzureFileshareProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal + { + + /// Internal Acessors for ResourceState + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal.ResourceState { get => this._resourceState; set { {_resourceState = value;} } } + + /// Internal Acessors for ResourceStateSyncTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfoInternal.ResourceStateSyncTime { get => this._resourceStateSyncTime; set { {_resourceStateSyncTime = value;} } } + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPoint; + + /// The oldest backup copy available for this item in the service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPoint { get => this._oldestRecoveryPoint; set => this._oldestRecoveryPoint = value; } + + /// Backing field for property. + private string _policyState; + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyState { get => this._policyState; set => this._policyState = value; } + + /// Backing field for property. + private int? _recoveryPointCount; + + /// Number of available backup copies associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? RecoveryPointCount { get => this._recoveryPointCount; set => this._recoveryPointCount = value; } + + /// Backing field for property. + private string _resourceState; + + /// + /// Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceState { get => this._resourceState; } + + /// Backing field for property. + private global::System.DateTime? _resourceStateSyncTime; + + /// The resource state sync time for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? ResourceStateSyncTime { get => this._resourceStateSyncTime; } + + /// Creates an new instance. + public AzureFileshareProtectedItemExtendedInfo() + { + + } + } + /// Additional information about Azure File Share backup item. + public partial interface IAzureFileshareProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The oldest backup copy available for this item in the service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this item in the service.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates consistency of policy object and policy applied to this backup item.", + SerializedName = @"policyState", + PossibleTypes = new [] { typeof(string) })] + string PolicyState { get; set; } + /// Number of available backup copies associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of available backup copies associated with this backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? RecoveryPointCount { get; set; } + /// + /// Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted}", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(string) })] + string ResourceState { get; } + /// The resource state sync time for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The resource state sync time for this backup item.", + SerializedName = @"resourceStateSyncTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ResourceStateSyncTime { get; } + + } + /// Additional information about Azure File Share backup item. + internal partial interface IAzureFileshareProtectedItemExtendedInfoInternal + + { + /// The oldest backup copy available for this item in the service. + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + string PolicyState { get; set; } + /// Number of available backup copies associated with this backup item. + int? RecoveryPointCount { get; set; } + /// + /// Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// + string ResourceState { get; set; } + /// The resource state sync time for this backup item. + global::System.DateTime? ResourceStateSyncTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemExtendedInfo.json.cs new file mode 100644 index 000000000000..b2868c7fb3d1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemExtendedInfo.json.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information about Azure File Share backup item. + public partial class AzureFileshareProtectedItemExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFileshareProtectedItemExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_oldestRecoveryPoint = If( json?.PropertyT("oldestRecoveryPoint"), out var __jsonOldestRecoveryPoint) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPoint, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointValue) ? __jsonOldestRecoveryPointValue : OldestRecoveryPoint : OldestRecoveryPoint;} + {_recoveryPointCount = If( json?.PropertyT("recoveryPointCount"), out var __jsonRecoveryPointCount) ? (int?)__jsonRecoveryPointCount : RecoveryPointCount;} + {_policyState = If( json?.PropertyT("policyState"), out var __jsonPolicyState) ? (string)__jsonPolicyState : (string)PolicyState;} + {_resourceState = If( json?.PropertyT("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState;} + {_resourceStateSyncTime = If( json?.PropertyT("resourceStateSyncTime"), out var __jsonResourceStateSyncTime) ? global::System.DateTime.TryParse((string)__jsonResourceStateSyncTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonResourceStateSyncTimeValue) ? __jsonResourceStateSyncTimeValue : ResourceStateSyncTime : ResourceStateSyncTime;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureFileshareProtectedItemExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._oldestRecoveryPoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPoint?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPoint" ,container.Add ); + AddIf( null != this._recoveryPointCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._recoveryPointCount) : null, "recoveryPointCount" ,container.Add ); + AddIf( null != (((object)this._policyState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyState.ToString()) : null, "policyState" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceState.ToString()) : null, "resourceState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._resourceStateSyncTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceStateSyncTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "resourceStateSyncTime" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemKpisHealths.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemKpisHealths.cs new file mode 100644 index 000000000000..02b2b5d46ead --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemKpisHealths.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Health details of different KPIs + public partial class AzureFileshareProtectedItemKpisHealths : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealths, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealthsInternal + { + + /// Creates an new instance. + public AzureFileshareProtectedItemKpisHealths() + { + + } + } + /// Health details of different KPIs + public partial interface IAzureFileshareProtectedItemKpisHealths : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Health details of different KPIs + internal partial interface IAzureFileshareProtectedItemKpisHealthsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemKpisHealths.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemKpisHealths.dictionary.cs new file mode 100644 index 000000000000..27abfa2f11d5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemKpisHealths.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureFileshareProtectedItemKpisHealths : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureFileshareProtectedItemKpisHealths source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemKpisHealths.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemKpisHealths.json.cs new file mode 100644 index 000000000000..867a4d273e11 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureFileshareProtectedItemKpisHealths.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Health details of different KPIs + public partial class AzureFileshareProtectedItemKpisHealths + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureFileshareProtectedItemKpisHealths(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.KpiResourceHealthDetails.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealths. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealths. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureFileshareProtectedItemKpisHealths FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureFileshareProtectedItemKpisHealths(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmcontainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmcontainer.cs new file mode 100644 index 000000000000..67e7461d8e94 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmcontainer.cs @@ -0,0 +1,98 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item representing a classic virtual machine. + public partial class AzureIaaSClassicComputeVmcontainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmcontainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmcontainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainer __iaaSvmContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaaSvmContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).ContainerType = value ; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).HealthStatus = value ?? null; } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).ProtectableObjectType = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).RegistrationStatus = value ?? null; } + + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ResourceGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).ResourceGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).ResourceGroup = value ?? null; } + + /// + /// Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).VirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).VirtualMachineId = value ?? null; } + + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).VirtualMachineVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).VirtualMachineVersion = value ?? null; } + + /// Creates an new instance. + public AzureIaaSClassicComputeVmcontainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__iaaSvmContainer), __iaaSvmContainer); + await eventListener.AssertObjectIsValid(nameof(__iaaSvmContainer), __iaaSvmContainer); + } + } + /// IaaS VM workload-specific backup item representing a classic virtual machine. + public partial interface IAzureIaaSClassicComputeVmcontainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainer + { + + } + /// IaaS VM workload-specific backup item representing a classic virtual machine. + internal partial interface IAzureIaaSClassicComputeVmcontainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmcontainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmcontainer.json.cs new file mode 100644 index 000000000000..9beb8ef0d637 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmcontainer.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item representing a classic virtual machine. + public partial class AzureIaaSClassicComputeVmcontainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSClassicComputeVmcontainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __iaaSvmContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaaSvmContainer(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmcontainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmcontainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmcontainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSClassicComputeVmcontainer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __iaaSvmContainer?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectableItem.cs new file mode 100644 index 000000000000..4f54153a8d6f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectableItem.cs @@ -0,0 +1,89 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item representing the Classic Compute VM. + public partial class AzureIaaSClassicComputeVmprotectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItem __iaaSvmProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaaSvmProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).FriendlyName = value ?? null; } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ResourceGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).ResourceGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).ResourceGroup = value ?? null; } + + /// Fully qualified ARM ID of the virtual machine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).VirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).VirtualMachineId = value ?? null; } + + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).VirtualMachineVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).VirtualMachineVersion = value ?? null; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureIaaSClassicComputeVmprotectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__iaaSvmProtectableItem), __iaaSvmProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__iaaSvmProtectableItem), __iaaSvmProtectableItem); + } + } + /// IaaS VM workload-specific backup item representing the Classic Compute VM. + public partial interface IAzureIaaSClassicComputeVmprotectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItem + { + + } + /// IaaS VM workload-specific backup item representing the Classic Compute VM. + internal partial interface IAzureIaaSClassicComputeVmprotectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectableItem.json.cs new file mode 100644 index 000000000000..cc7a8d511f43 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectableItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item representing the Classic Compute VM. + public partial class AzureIaaSClassicComputeVmprotectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSClassicComputeVmprotectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __iaaSvmProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaaSvmProtectableItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSClassicComputeVmprotectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __iaaSvmProtectableItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectedItem.cs new file mode 100644 index 000000000000..ee2ebfc47509 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectedItem.cs @@ -0,0 +1,243 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item representing the Classic Compute VM. + public partial class AzureIaaSClassicComputeVmprotectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItem __azureIaaSvmProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int[] DiskExclusionPropertyDiskLunList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).DiskExclusionPropertyDiskLunList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).DiskExclusionPropertyDiskLunList = value ?? null /* arrayOf */; } + + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? DiskExclusionPropertyIsInclusionList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).DiskExclusionPropertyIsInclusionList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).DiskExclusionPropertyIsInclusionList = value ?? default(bool); } + + /// Additional information for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfo = value ?? null /* model class */; } + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoNewestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoNewestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPointInVault; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPointInVault = value ?? default(global::System.DateTime); } + + /// Specifies if backup policy associated with the backup item is inconsistent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? ExtendedInfoPolicyInconsistent { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoPolicyInconsistent; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoPolicyInconsistent = value ?? default(bool); } + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoRecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoRecoveryPointCount = value ?? default(int); } + + /// Extended Properties for Azure IaasVM Backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties ExtendedProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedProperty = value ?? null /* model class */; } + + /// Extended Properties for Disk Exclusion. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties ExtendedPropertyDiskExclusionProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedPropertyDiskExclusionProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedPropertyDiskExclusionProperty = value ?? null /* model class */; } + + /// Linux VM name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedPropertyLinuxVMApplicationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedPropertyLinuxVMApplicationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedPropertyLinuxVMApplicationName = value ?? null; } + + /// Friendly name of the VM represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).FriendlyName; } + + /// Health details on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] HealthDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthDetail = value ?? null /* arrayOf */; } + + /// Health status of protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus? HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthStatus; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths KpisHealth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).KpisHealth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).KpisHealth = value ?? null /* model class */; } + + /// Last backup operation status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupStatus = value ?? null; } + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastBackupTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupTime; } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for FriendlyName + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).FriendlyName = value; } + + /// Internal Acessors for HealthStatus + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthStatus = value; } + + /// Internal Acessors for LastBackupTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.LastBackupTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupTime = value; } + + /// Internal Acessors for ProtectedItemDataId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.ProtectedItemDataId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectedItemDataId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectedItemDataId = value; } + + /// Internal Acessors for VirtualMachineId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.VirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).VirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).VirtualMachineId = value; } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).WorkloadType = value; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).PolicyName = value ?? null; } + + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectedItemDataId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectedItemDataId; } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState)""); } + + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectionStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectionStatus = value ?? null; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).VaultId; } + + /// Fully qualified ARM ID of the virtual machine represented by this item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).VirtualMachineId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).WorkloadType; } + + /// Creates an new instance. + public AzureIaaSClassicComputeVmprotectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureIaaSvmProtectedItem), __azureIaaSvmProtectedItem); + await eventListener.AssertObjectIsValid(nameof(__azureIaaSvmProtectedItem), __azureIaaSvmProtectedItem); + } + } + /// IaaS VM workload-specific backup item representing the Classic Compute VM. + public partial interface IAzureIaaSClassicComputeVmprotectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItem + { + + } + /// IaaS VM workload-specific backup item representing the Classic Compute VM. + internal partial interface IAzureIaaSClassicComputeVmprotectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectedItem.json.cs new file mode 100644 index 000000000000..fac47cf20cd3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSClassicComputeVmprotectedItem.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item representing the Classic Compute VM. + public partial class AzureIaaSClassicComputeVmprotectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSClassicComputeVmprotectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureIaaSvmProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSClassicComputeVmprotectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSClassicComputeVmprotectedItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureIaaSvmProtectedItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmcontainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmcontainer.cs new file mode 100644 index 000000000000..7a25f2085706 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmcontainer.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. + /// + public partial class AzureIaaSComputeVmcontainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmcontainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmcontainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainer __iaaSvmContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaaSvmContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).ContainerType = value ; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).HealthStatus = value ?? null; } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).ProtectableObjectType = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__iaaSvmContainer).RegistrationStatus = value ?? null; } + + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ResourceGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).ResourceGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).ResourceGroup = value ?? null; } + + /// + /// Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).VirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).VirtualMachineId = value ?? null; } + + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).VirtualMachineVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal)__iaaSvmContainer).VirtualMachineVersion = value ?? null; } + + /// Creates an new instance. + public AzureIaaSComputeVmcontainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__iaaSvmContainer), __iaaSvmContainer); + await eventListener.AssertObjectIsValid(nameof(__iaaSvmContainer), __iaaSvmContainer); + } + } + /// IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. + public partial interface IAzureIaaSComputeVmcontainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainer + { + + } + /// IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. + internal partial interface IAzureIaaSComputeVmcontainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmcontainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmcontainer.json.cs new file mode 100644 index 000000000000..252f93882960 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmcontainer.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. + /// + public partial class AzureIaaSComputeVmcontainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSComputeVmcontainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __iaaSvmContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaaSvmContainer(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmcontainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmcontainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmcontainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSComputeVmcontainer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __iaaSvmContainer?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectableItem.cs new file mode 100644 index 000000000000..bfc59c14786e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectableItem.cs @@ -0,0 +1,89 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + /// + public partial class AzureIaaSComputeVmprotectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItem __iaaSvmProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaaSvmProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).FriendlyName = value ?? null; } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ResourceGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).ResourceGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).ResourceGroup = value ?? null; } + + /// Fully qualified ARM ID of the virtual machine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).VirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).VirtualMachineId = value ?? null; } + + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).VirtualMachineVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal)__iaaSvmProtectableItem).VirtualMachineVersion = value ?? null; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__iaaSvmProtectableItem).WorkloadType = value ?? null; } + + /// Creates an new instance. + public AzureIaaSComputeVmprotectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__iaaSvmProtectableItem), __iaaSvmProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__iaaSvmProtectableItem), __iaaSvmProtectableItem); + } + } + /// IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + public partial interface IAzureIaaSComputeVmprotectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItem + { + + } + /// IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + internal partial interface IAzureIaaSComputeVmprotectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectableItem.json.cs new file mode 100644 index 000000000000..6bdd8ccaa774 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectableItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + /// + public partial class AzureIaaSComputeVmprotectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSComputeVmprotectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __iaaSvmProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaaSvmProtectableItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSComputeVmprotectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __iaaSvmProtectableItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectedItem.cs new file mode 100644 index 000000000000..0b01c4f4844f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectedItem.cs @@ -0,0 +1,245 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + /// + public partial class AzureIaaSComputeVmprotectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItem __azureIaaSvmProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int[] DiskExclusionPropertyDiskLunList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).DiskExclusionPropertyDiskLunList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).DiskExclusionPropertyDiskLunList = value ?? null /* arrayOf */; } + + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? DiskExclusionPropertyIsInclusionList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).DiskExclusionPropertyIsInclusionList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).DiskExclusionPropertyIsInclusionList = value ?? default(bool); } + + /// Additional information for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfo = value ?? null /* model class */; } + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoNewestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoNewestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPointInVault; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoOldestRecoveryPointInVault = value ?? default(global::System.DateTime); } + + /// Specifies if backup policy associated with the backup item is inconsistent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? ExtendedInfoPolicyInconsistent { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoPolicyInconsistent; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoPolicyInconsistent = value ?? default(bool); } + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoRecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedInfoRecoveryPointCount = value ?? default(int); } + + /// Extended Properties for Azure IaasVM Backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties ExtendedProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedProperty = value ?? null /* model class */; } + + /// Extended Properties for Disk Exclusion. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties ExtendedPropertyDiskExclusionProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedPropertyDiskExclusionProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedPropertyDiskExclusionProperty = value ?? null /* model class */; } + + /// Linux VM name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedPropertyLinuxVMApplicationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedPropertyLinuxVMApplicationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ExtendedPropertyLinuxVMApplicationName = value ?? null; } + + /// Friendly name of the VM represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).FriendlyName; } + + /// Health details on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] HealthDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthDetail = value ?? null /* arrayOf */; } + + /// Health status of protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus? HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthStatus; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths KpisHealth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).KpisHealth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).KpisHealth = value ?? null /* model class */; } + + /// Last backup operation status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupStatus = value ?? null; } + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastBackupTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupTime; } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for FriendlyName + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).FriendlyName = value; } + + /// Internal Acessors for HealthStatus + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).HealthStatus = value; } + + /// Internal Acessors for LastBackupTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.LastBackupTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).LastBackupTime = value; } + + /// Internal Acessors for ProtectedItemDataId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.ProtectedItemDataId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectedItemDataId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectedItemDataId = value; } + + /// Internal Acessors for VirtualMachineId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.VirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).VirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).VirtualMachineId = value; } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).WorkloadType = value; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).PolicyName = value ?? null; } + + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectedItemDataId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectedItemDataId; } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState)""); } + + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectionStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).ProtectionStatus = value ?? null; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).VaultId; } + + /// Fully qualified ARM ID of the virtual machine represented by this item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal)__azureIaaSvmProtectedItem).VirtualMachineId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureIaaSvmProtectedItem).WorkloadType; } + + /// Creates an new instance. + public AzureIaaSComputeVmprotectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureIaaSvmProtectedItem), __azureIaaSvmProtectedItem); + await eventListener.AssertObjectIsValid(nameof(__azureIaaSvmProtectedItem), __azureIaaSvmProtectedItem); + } + } + /// IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + public partial interface IAzureIaaSComputeVmprotectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItem + { + + } + /// IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + internal partial interface IAzureIaaSComputeVmprotectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectedItem.json.cs new file mode 100644 index 000000000000..908e5aa4e048 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSComputeVmprotectedItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + /// + public partial class AzureIaaSComputeVmprotectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSComputeVmprotectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureIaaSvmProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSComputeVmprotectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSComputeVmprotectedItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureIaaSvmProtectedItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmErrorInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmErrorInfo.cs new file mode 100644 index 000000000000..f806a7c66a3a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmErrorInfo.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific error information. + public partial class AzureIaaSvmErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfoInternal + { + + /// Backing field for property. + private int? _errorCode; + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ErrorCode { get => this._errorCode; } + + /// Backing field for property. + private string _errorString; + + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorString { get => this._errorString; } + + /// Backing field for property. + private string _errorTitle; + + /// Title: Typically, the entity that the error pertains to. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorTitle { get => this._errorTitle; } + + /// Internal Acessors for ErrorCode + int? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfoInternal.ErrorCode { get => this._errorCode; set { {_errorCode = value;} } } + + /// Internal Acessors for ErrorString + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfoInternal.ErrorString { get => this._errorString; set { {_errorString = value;} } } + + /// Internal Acessors for ErrorTitle + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfoInternal.ErrorTitle { get => this._errorTitle; set { {_errorTitle = value;} } } + + /// Internal Acessors for Recommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfoInternal.Recommendation { get => this._recommendation; set { {_recommendation = value;} } } + + /// Backing field for property. + private string[] _recommendation; + + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Recommendation { get => this._recommendation; } + + /// Creates an new instance. + public AzureIaaSvmErrorInfo() + { + + } + } + /// Azure IaaS VM workload-specific error information. + public partial interface IAzureIaaSvmErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code.", + SerializedName = @"errorCode", + PossibleTypes = new [] { typeof(int) })] + int? ErrorCode { get; } + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Localized error string.", + SerializedName = @"errorString", + PossibleTypes = new [] { typeof(string) })] + string ErrorString { get; } + /// Title: Typically, the entity that the error pertains to. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Title: Typically, the entity that the error pertains to.", + SerializedName = @"errorTitle", + PossibleTypes = new [] { typeof(string) })] + string ErrorTitle { get; } + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of localized recommendations for above error code.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] Recommendation { get; } + + } + /// Azure IaaS VM workload-specific error information. + internal partial interface IAzureIaaSvmErrorInfoInternal + + { + /// Error code. + int? ErrorCode { get; set; } + /// Localized error string. + string ErrorString { get; set; } + /// Title: Typically, the entity that the error pertains to. + string ErrorTitle { get; set; } + /// List of localized recommendations for above error code. + string[] Recommendation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmErrorInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmErrorInfo.json.cs new file mode 100644 index 000000000000..f9382fa47d62 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmErrorInfo.json.cs @@ -0,0 +1,134 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific error information. + public partial class AzureIaaSvmErrorInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSvmErrorInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorCode = If( json?.PropertyT("errorCode"), out var __jsonErrorCode) ? (int?)__jsonErrorCode : ErrorCode;} + {_errorTitle = If( json?.PropertyT("errorTitle"), out var __jsonErrorTitle) ? (string)__jsonErrorTitle : (string)ErrorTitle;} + {_errorString = If( json?.PropertyT("errorString"), out var __jsonErrorString) ? (string)__jsonErrorString : (string)ErrorString;} + {_recommendation = If( json?.PropertyT("recommendations"), out var __jsonRecommendations) ? If( __jsonRecommendations as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Recommendation;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmErrorInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._errorCode ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._errorCode) : null, "errorCode" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._errorTitle)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorTitle.ToString()) : null, "errorTitle" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._errorString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorString.ToString()) : null, "errorString" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._recommendation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recommendation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("recommendations",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmHealthDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmHealthDetails.cs new file mode 100644 index 000000000000..c91e6961e906 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmHealthDetails.cs @@ -0,0 +1,81 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific Health Details. + public partial class AzureIaaSvmHealthDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmHealthDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmHealthDetailsInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails __resourceHealthDetails = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceHealthDetails(); + + /// Health Code + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Code; } + + /// Health Message + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Message; } + + /// Internal Acessors for Code + int? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Code = value; } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Message = value; } + + /// Internal Acessors for Recommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal.Recommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Recommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Recommendation = value; } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Title = value; } + + /// Health Recommended Actions + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] Recommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Recommendation; } + + /// Health Title + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal)__resourceHealthDetails).Title; } + + /// Creates an new instance. + public AzureIaaSvmHealthDetails() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceHealthDetails), __resourceHealthDetails); + await eventListener.AssertObjectIsValid(nameof(__resourceHealthDetails), __resourceHealthDetails); + } + } + /// Azure IaaS VM workload-specific Health Details. + public partial interface IAzureIaaSvmHealthDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails + { + + } + /// Azure IaaS VM workload-specific Health Details. + internal partial interface IAzureIaaSvmHealthDetailsInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmHealthDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmHealthDetails.json.cs new file mode 100644 index 000000000000..5e08f4e61db1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmHealthDetails.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific Health Details. + public partial class AzureIaaSvmHealthDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSvmHealthDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceHealthDetails = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceHealthDetails(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmHealthDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmHealthDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmHealthDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmHealthDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceHealthDetails?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJob.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJob.cs new file mode 100644 index 000000000000..2e97bf994047 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJob.cs @@ -0,0 +1,285 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific job object. + public partial class AzureIaaSvmJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJob, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] _actionsInfo; + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get => this._actionsInfo; set => this._actionsInfo = value; } + + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ActivityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId = value ?? null; } + + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private string _containerName; + + /// Container name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime = value ?? default(global::System.DateTime); } + + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EntityFriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo[] _errorDetail; + + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo[] ErrorDetail { get => this._errorDetail; set => this._errorDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo _extendedInfo; + + /// Additional information for this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfo()); set => this._extendedInfo = value; } + + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoDynamicErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage = value ?? null; } + + /// Time remaining for execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoEstimatedRemainingDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).EstimatedRemainingDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).EstimatedRemainingDuration = value ?? null; } + + /// Job internal properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag ExtendedInfoInternalPropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).InternalPropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).InternalPropertyBag = value ?? null /* model class */; } + + /// Indicates progress of the job. Null if it has not started or completed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public double? ExtendedInfoProgressPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).ProgressPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).ProgressPercentage = value ?? default(double); } + + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).PropertyBag = value ?? null /* model class */; } + + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] ExtendedInfoTasksList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).TasksList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).TasksList = value ?? null /* arrayOf */; } + + /// Backing field for property. + private bool? _isUserTriggered; + + /// Indicated that whether the job is adhoc(true) or scheduled(false) + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsUserTriggered { get => this._isUserTriggered; set => this._isUserTriggered = value; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfo()); set { {_extendedInfo = value;} } } + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation = value ?? null; } + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime = value ?? default(global::System.DateTime); } + + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status = value ?? null; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type = value ; } + + /// Backing field for property. + private string _virtualMachineVersion; + + /// Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualMachineVersion { get => this._virtualMachineVersion; set => this._virtualMachineVersion = value; } + + /// Creates an new instance. + public AzureIaaSvmJob() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__job), __job); + await eventListener.AssertObjectIsValid(nameof(__job), __job); + } + } + /// Azure IaaS VM workload-specific job object. + public partial interface IAzureIaaSvmJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the state/actions applicable on this job like cancel/retry.", + SerializedName = @"actionsInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Container name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Container name of the entity on which the current job is executing.", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time elapsed during the execution of this job.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error details on execution of this job.", + SerializedName = @"errorDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo[] ErrorDetail { get; set; } + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message on job execution.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoDynamicErrorMessage { get; set; } + /// Time remaining for execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time remaining for execution of this job.", + SerializedName = @"estimatedRemainingDuration", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoEstimatedRemainingDuration { get; set; } + /// Job internal properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job internal properties.", + SerializedName = @"internalPropertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag ExtendedInfoInternalPropertyBag { get; set; } + /// Indicates progress of the job. Null if it has not started or completed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates progress of the job. Null if it has not started or completed.", + SerializedName = @"progressPercentage", + PossibleTypes = new [] { typeof(double) })] + double? ExtendedInfoProgressPercentage { get; set; } + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks associated with this job.", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Indicated that whether the job is adhoc(true) or scheduled(false) + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicated that whether the job is adhoc(true) or scheduled(false)", + SerializedName = @"isUserTriggered", + PossibleTypes = new [] { typeof(bool) })] + bool? IsUserTriggered { get; set; } + /// Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the backup item is a Classic or an Azure Resource Manager VM.", + SerializedName = @"virtualMachineVersion", + PossibleTypes = new [] { typeof(string) })] + string VirtualMachineVersion { get; set; } + + } + /// Azure IaaS VM workload-specific job object. + internal partial interface IAzureIaaSvmJobInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Container name of the entity on which the current job is executing. + string ContainerName { get; set; } + /// Time elapsed during the execution of this job. + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo[] ErrorDetail { get; set; } + /// Additional information for this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo ExtendedInfo { get; set; } + /// Non localized error message on job execution. + string ExtendedInfoDynamicErrorMessage { get; set; } + /// Time remaining for execution of this job. + string ExtendedInfoEstimatedRemainingDuration { get; set; } + /// Job internal properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag ExtendedInfoInternalPropertyBag { get; set; } + /// Indicates progress of the job. Null if it has not started or completed. + double? ExtendedInfoProgressPercentage { get; set; } + /// Job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks associated with this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Indicated that whether the job is adhoc(true) or scheduled(false) + bool? IsUserTriggered { get; set; } + /// Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + string VirtualMachineVersion { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJob.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJob.json.cs new file mode 100644 index 000000000000..465cc45ea4df --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJob.json.cs @@ -0,0 +1,138 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific job object. + public partial class AzureIaaSvmJob + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSvmJob(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_actionsInfo = If( json?.PropertyT("actionsInfo"), out var __jsonActionsInfo) ? If( __jsonActionsInfo as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)""))) ))() : null : ActionsInfo;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? If( __jsonErrorDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmErrorInfo.FromJson(__p) )) ))() : null : ErrorDetail;} + {_virtualMachineVersion = If( json?.PropertyT("virtualMachineVersion"), out var __jsonVirtualMachineVersion) ? (string)__jsonVirtualMachineVersion : (string)VirtualMachineVersion;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_isUserTriggered = If( json?.PropertyT("isUserTriggered"), out var __jsonIsUserTriggered) ? (bool?)__jsonIsUserTriggered : IsUserTriggered;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJob. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJob. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmJob(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __job?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + if (null != this._actionsInfo) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._actionsInfo ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("actionsInfo",__w); + } + if (null != this._errorDetail) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._errorDetail ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("errorDetails",__r); + } + AddIf( null != (((object)this._virtualMachineVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualMachineVersion.ToString()) : null, "virtualMachineVersion" ,container.Add ); + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != this._isUserTriggered ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isUserTriggered) : null, "isUserTriggered" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfo.cs new file mode 100644 index 000000000000..34c668912a4d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfo.cs @@ -0,0 +1,136 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific additional information for job. + public partial class AzureIaaSvmJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal + { + + /// Backing field for property. + private string _dynamicErrorMessage; + + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DynamicErrorMessage { get => this._dynamicErrorMessage; set => this._dynamicErrorMessage = value; } + + /// Backing field for property. + private string _estimatedRemainingDuration; + + /// Time remaining for execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string EstimatedRemainingDuration { get => this._estimatedRemainingDuration; set => this._estimatedRemainingDuration = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag _internalPropertyBag; + + /// Job internal properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag InternalPropertyBag { get => (this._internalPropertyBag = this._internalPropertyBag ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfoInternalPropertyBag()); set => this._internalPropertyBag = value; } + + /// Backing field for property. + private double? _progressPercentage; + + /// Indicates progress of the job. Null if it has not started or completed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public double? ProgressPercentage { get => this._progressPercentage; set => this._progressPercentage = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag _propertyBag; + + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag PropertyBag { get => (this._propertyBag = this._propertyBag ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfoPropertyBag()); set => this._propertyBag = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] _tasksList; + + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] TasksList { get => this._tasksList; set => this._tasksList = value; } + + /// Creates an new instance. + public AzureIaaSvmJobExtendedInfo() + { + + } + } + /// Azure IaaS VM workload-specific additional information for job. + public partial interface IAzureIaaSvmJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message on job execution.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string DynamicErrorMessage { get; set; } + /// Time remaining for execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time remaining for execution of this job.", + SerializedName = @"estimatedRemainingDuration", + PossibleTypes = new [] { typeof(string) })] + string EstimatedRemainingDuration { get; set; } + /// Job internal properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job internal properties.", + SerializedName = @"internalPropertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag InternalPropertyBag { get; set; } + /// Indicates progress of the job. Null if it has not started or completed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates progress of the job. Null if it has not started or completed.", + SerializedName = @"progressPercentage", + PossibleTypes = new [] { typeof(double) })] + double? ProgressPercentage { get; set; } + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks associated with this job.", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] TasksList { get; set; } + + } + /// Azure IaaS VM workload-specific additional information for job. + internal partial interface IAzureIaaSvmJobExtendedInfoInternal + + { + /// Non localized error message on job execution. + string DynamicErrorMessage { get; set; } + /// Time remaining for execution of this job. + string EstimatedRemainingDuration { get; set; } + /// Job internal properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag InternalPropertyBag { get; set; } + /// Indicates progress of the job. Null if it has not started or completed. + double? ProgressPercentage { get; set; } + /// Job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks associated with this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] TasksList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfo.json.cs new file mode 100644 index 000000000000..90f562b518b9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfo.json.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific additional information for job. + public partial class AzureIaaSvmJobExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSvmJobExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_tasksList = If( json?.PropertyT("tasksList"), out var __jsonTasksList) ? If( __jsonTasksList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobTaskDetails.FromJson(__u) )) ))() : null : TasksList;} + {_propertyBag = If( json?.PropertyT("propertyBag"), out var __jsonPropertyBag) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfoPropertyBag.FromJson(__jsonPropertyBag) : PropertyBag;} + {_internalPropertyBag = If( json?.PropertyT("internalPropertyBag"), out var __jsonInternalPropertyBag) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfoInternalPropertyBag.FromJson(__jsonInternalPropertyBag) : InternalPropertyBag;} + {_progressPercentage = If( json?.PropertyT("progressPercentage"), out var __jsonProgressPercentage) ? (double?)__jsonProgressPercentage : ProgressPercentage;} + {_estimatedRemainingDuration = If( json?.PropertyT("estimatedRemainingDuration"), out var __jsonEstimatedRemainingDuration) ? (string)__jsonEstimatedRemainingDuration : (string)EstimatedRemainingDuration;} + {_dynamicErrorMessage = If( json?.PropertyT("dynamicErrorMessage"), out var __jsonDynamicErrorMessage) ? (string)__jsonDynamicErrorMessage : (string)DynamicErrorMessage;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmJobExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._tasksList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._tasksList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tasksList",__w); + } + AddIf( null != this._propertyBag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._propertyBag.ToJson(null,serializationMode) : null, "propertyBag" ,container.Add ); + AddIf( null != this._internalPropertyBag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._internalPropertyBag.ToJson(null,serializationMode) : null, "internalPropertyBag" ,container.Add ); + AddIf( null != this._progressPercentage ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((double)this._progressPercentage) : null, "progressPercentage" ,container.Add ); + AddIf( null != (((object)this._estimatedRemainingDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._estimatedRemainingDuration.ToString()) : null, "estimatedRemainingDuration" ,container.Add ); + AddIf( null != (((object)this._dynamicErrorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dynamicErrorMessage.ToString()) : null, "dynamicErrorMessage" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoInternalPropertyBag.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoInternalPropertyBag.cs new file mode 100644 index 000000000000..785692a790f7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoInternalPropertyBag.cs @@ -0,0 +1,37 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job internal properties. + public partial class AzureIaaSvmJobExtendedInfoInternalPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBagInternal + { + + /// + /// Creates an new instance. + /// + public AzureIaaSvmJobExtendedInfoInternalPropertyBag() + { + + } + } + /// Job internal properties. + public partial interface IAzureIaaSvmJobExtendedInfoInternalPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Job internal properties. + internal partial interface IAzureIaaSvmJobExtendedInfoInternalPropertyBagInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoInternalPropertyBag.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoInternalPropertyBag.dictionary.cs new file mode 100644 index 000000000000..17c13d233e03 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoInternalPropertyBag.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureIaaSvmJobExtendedInfoInternalPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfoInternalPropertyBag source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoInternalPropertyBag.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoInternalPropertyBag.json.cs new file mode 100644 index 000000000000..7fa084da1c58 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoInternalPropertyBag.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job internal properties. + public partial class AzureIaaSvmJobExtendedInfoInternalPropertyBag + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureIaaSvmJobExtendedInfoInternalPropertyBag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmJobExtendedInfoInternalPropertyBag(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoPropertyBag.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoPropertyBag.cs new file mode 100644 index 000000000000..1b0fe69970bb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoPropertyBag.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job properties. + public partial class AzureIaaSvmJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBagInternal + { + + /// Creates an new instance. + public AzureIaaSvmJobExtendedInfoPropertyBag() + { + + } + } + /// Job properties. + public partial interface IAzureIaaSvmJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Job properties. + internal partial interface IAzureIaaSvmJobExtendedInfoPropertyBagInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoPropertyBag.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoPropertyBag.dictionary.cs new file mode 100644 index 000000000000..bc7cd39fb30b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoPropertyBag.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureIaaSvmJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfoPropertyBag source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoPropertyBag.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoPropertyBag.json.cs new file mode 100644 index 000000000000..7235d7872f81 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobExtendedInfoPropertyBag.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job properties. + public partial class AzureIaaSvmJobExtendedInfoPropertyBag + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureIaaSvmJobExtendedInfoPropertyBag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmJobExtendedInfoPropertyBag(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobTaskDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobTaskDetails.cs new file mode 100644 index 000000000000..03fa32f63d86 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobTaskDetails.cs @@ -0,0 +1,180 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific job task details. + public partial class AzureIaaSvmJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetailsInternal + { + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time elapsed for task. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private string _instanceId; + + /// The instanceId. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string InstanceId { get => this._instanceId; set => this._instanceId = value; } + + /// Backing field for property. + private double? _progressPercentage; + + /// Progress of the task. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public double? ProgressPercentage { get => this._progressPercentage; set => this._progressPercentage = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private string _status; + + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private string _taskExecutionDetail; + + /// + /// Details about execution of the task. + /// eg: number of bytes transferred etc + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TaskExecutionDetail { get => this._taskExecutionDetail; set => this._taskExecutionDetail = value; } + + /// Backing field for property. + private string _taskId; + + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TaskId { get => this._taskId; set => this._taskId = value; } + + /// Creates an new instance. + public AzureIaaSvmJobTaskDetails() + { + + } + } + /// Azure IaaS VM workload-specific job task details. + public partial interface IAzureIaaSvmJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Time elapsed for task. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time elapsed for task.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// The instanceId. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The instanceId.", + SerializedName = @"instanceId", + PossibleTypes = new [] { typeof(string) })] + string InstanceId { get; set; } + /// Progress of the task. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Progress of the task.", + SerializedName = @"progressPercentage", + PossibleTypes = new [] { typeof(double) })] + double? ProgressPercentage { get; set; } + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// + /// Details about execution of the task. + /// eg: number of bytes transferred etc + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Details about execution of the task. + eg: number of bytes transferred etc", + SerializedName = @"taskExecutionDetails", + PossibleTypes = new [] { typeof(string) })] + string TaskExecutionDetail { get; set; } + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The task display name.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; set; } + + } + /// Azure IaaS VM workload-specific job task details. + internal partial interface IAzureIaaSvmJobTaskDetailsInternal + + { + /// Time elapsed for task. + global::System.TimeSpan? Duration { get; set; } + /// The end time. + global::System.DateTime? EndTime { get; set; } + /// The instanceId. + string InstanceId { get; set; } + /// Progress of the task. + double? ProgressPercentage { get; set; } + /// The start time. + global::System.DateTime? StartTime { get; set; } + /// The status. + string Status { get; set; } + /// + /// Details about execution of the task. + /// eg: number of bytes transferred etc + /// + string TaskExecutionDetail { get; set; } + /// The task display name. + string TaskId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobTaskDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobTaskDetails.json.cs new file mode 100644 index 000000000000..44dd760844b7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobTaskDetails.json.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific job task details. + public partial class AzureIaaSvmJobTaskDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSvmJobTaskDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_taskId = If( json?.PropertyT("taskId"), out var __jsonTaskId) ? (string)__jsonTaskId : (string)TaskId;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_instanceId = If( json?.PropertyT("instanceId"), out var __jsonInstanceId) ? (string)__jsonInstanceId : (string)InstanceId;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_progressPercentage = If( json?.PropertyT("progressPercentage"), out var __jsonProgressPercentage) ? (double?)__jsonProgressPercentage : ProgressPercentage;} + {_taskExecutionDetail = If( json?.PropertyT("taskExecutionDetails"), out var __jsonTaskExecutionDetails) ? (string)__jsonTaskExecutionDetails : (string)TaskExecutionDetail;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmJobTaskDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._taskId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._taskId.ToString()) : null, "taskId" ,container.Add ); + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AddIf( null != (((object)this._instanceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._instanceId.ToString()) : null, "instanceId" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != this._progressPercentage ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((double)this._progressPercentage) : null, "progressPercentage" ,container.Add ); + AddIf( null != (((object)this._taskExecutionDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._taskExecutionDetail.ToString()) : null, "taskExecutionDetails" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobV2.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobV2.cs new file mode 100644 index 000000000000..12e1e72f6623 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobV2.cs @@ -0,0 +1,268 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific job object. + public partial class AzureIaaSvmJobV2 : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobV2, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobV2Internal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] _actionsInfo; + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get => this._actionsInfo; set => this._actionsInfo = value; } + + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ActivityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId = value ?? null; } + + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private string _containerName; + + /// Container name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime = value ?? default(global::System.DateTime); } + + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EntityFriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo[] _errorDetail; + + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo[] ErrorDetail { get => this._errorDetail; set => this._errorDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo _extendedInfo; + + /// Additional information for this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfo()); set => this._extendedInfo = value; } + + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoDynamicErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage = value ?? null; } + + /// Time remaining for execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoEstimatedRemainingDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).EstimatedRemainingDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).EstimatedRemainingDuration = value ?? null; } + + /// Job internal properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag ExtendedInfoInternalPropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).InternalPropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).InternalPropertyBag = value ?? null /* model class */; } + + /// Indicates progress of the job. Null if it has not started or completed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public double? ExtendedInfoProgressPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).ProgressPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).ProgressPercentage = value ?? default(double); } + + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).PropertyBag = value ?? null /* model class */; } + + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] ExtendedInfoTasksList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).TasksList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternal)ExtendedInfo).TasksList = value ?? null /* arrayOf */; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobV2Internal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfo()); set { {_extendedInfo = value;} } } + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation = value ?? null; } + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime = value ?? default(global::System.DateTime); } + + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status = value ?? null; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type = value ; } + + /// Backing field for property. + private string _virtualMachineVersion; + + /// Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualMachineVersion { get => this._virtualMachineVersion; set => this._virtualMachineVersion = value; } + + /// Creates an new instance. + public AzureIaaSvmJobV2() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__job), __job); + await eventListener.AssertObjectIsValid(nameof(__job), __job); + } + } + /// Azure IaaS VM workload-specific job object. + public partial interface IAzureIaaSvmJobV2 : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the state/actions applicable on this job like cancel/retry.", + SerializedName = @"actionsInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Container name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Container name of the entity on which the current job is executing.", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time elapsed during the execution of this job.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error details on execution of this job.", + SerializedName = @"errorDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo[] ErrorDetail { get; set; } + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message on job execution.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoDynamicErrorMessage { get; set; } + /// Time remaining for execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time remaining for execution of this job.", + SerializedName = @"estimatedRemainingDuration", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoEstimatedRemainingDuration { get; set; } + /// Job internal properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job internal properties.", + SerializedName = @"internalPropertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag ExtendedInfoInternalPropertyBag { get; set; } + /// Indicates progress of the job. Null if it has not started or completed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates progress of the job. Null if it has not started or completed.", + SerializedName = @"progressPercentage", + PossibleTypes = new [] { typeof(double) })] + double? ExtendedInfoProgressPercentage { get; set; } + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks associated with this job.", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the backup item is a Classic or an Azure Resource Manager VM.", + SerializedName = @"virtualMachineVersion", + PossibleTypes = new [] { typeof(string) })] + string VirtualMachineVersion { get; set; } + + } + /// Azure IaaS VM workload-specific job object. + internal partial interface IAzureIaaSvmJobV2Internal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Container name of the entity on which the current job is executing. + string ContainerName { get; set; } + /// Time elapsed during the execution of this job. + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo[] ErrorDetail { get; set; } + /// Additional information for this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfo ExtendedInfo { get; set; } + /// Non localized error message on job execution. + string ExtendedInfoDynamicErrorMessage { get; set; } + /// Time remaining for execution of this job. + string ExtendedInfoEstimatedRemainingDuration { get; set; } + /// Job internal properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoInternalPropertyBag ExtendedInfoInternalPropertyBag { get; set; } + /// Indicates progress of the job. Null if it has not started or completed. + double? ExtendedInfoProgressPercentage { get; set; } + /// Job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks associated with this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + string VirtualMachineVersion { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobV2.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobV2.json.cs new file mode 100644 index 000000000000..c0e57f73c9cd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmJobV2.json.cs @@ -0,0 +1,136 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure IaaS VM workload-specific job object. + public partial class AzureIaaSvmJobV2 + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSvmJobV2(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmJobExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_actionsInfo = If( json?.PropertyT("actionsInfo"), out var __jsonActionsInfo) ? If( __jsonActionsInfo as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)""))) ))() : null : ActionsInfo;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? If( __jsonErrorDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmErrorInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmErrorInfo.FromJson(__p) )) ))() : null : ErrorDetail;} + {_virtualMachineVersion = If( json?.PropertyT("virtualMachineVersion"), out var __jsonVirtualMachineVersion) ? (string)__jsonVirtualMachineVersion : (string)VirtualMachineVersion;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobV2. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobV2. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmJobV2 FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmJobV2(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __job?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + if (null != this._actionsInfo) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._actionsInfo ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("actionsInfo",__w); + } + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + if (null != this._errorDetail) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._errorDetail ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("errorDetails",__r); + } + AddIf( null != (((object)this._virtualMachineVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualMachineVersion.ToString()) : null, "virtualMachineVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItem.cs new file mode 100644 index 000000000000..4da88410c805 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItem.cs @@ -0,0 +1,480 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item. + public partial class AzureIaaSvmProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int[] DiskExclusionPropertyDiskLunList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal)ExtendedProperty).DiskExclusionPropertyDiskLunList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal)ExtendedProperty).DiskExclusionPropertyDiskLunList = value ?? null /* arrayOf */; } + + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? DiskExclusionPropertyIsInclusionList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal)ExtendedProperty).DiskExclusionPropertyIsInclusionList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal)ExtendedProperty).DiskExclusionPropertyIsInclusionList = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo _extendedInfo; + + /// Additional information for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItemExtendedInfo()); set => this._extendedInfo = value; } + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).NewestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).NewestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPointInVault; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPointInVault = value ?? default(global::System.DateTime); } + + /// Specifies if backup policy associated with the backup item is inconsistent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? ExtendedInfoPolicyInconsistent { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).PolicyInconsistent; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).PolicyInconsistent = value ?? default(bool); } + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties _extendedProperty; + + /// Extended Properties for Azure IaasVM Backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties ExtendedProperty { get => (this._extendedProperty = this._extendedProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ExtendedProperties()); set => this._extendedProperty = value; } + + /// Linux VM name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedPropertyLinuxVMApplicationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal)ExtendedProperty).LinuxVMApplicationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal)ExtendedProperty).LinuxVMApplicationName = value ?? null; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the VM represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] _healthDetail; + + /// Health details on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] HealthDetail { get => this._healthDetail; set => this._healthDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus? _healthStatus; + + /// Health status of protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus? HealthStatus { get => this._healthStatus; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths _kpisHealth; + + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths KpisHealth { get => (this._kpisHealth = this._kpisHealth ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItemKpisHealths()); set => this._kpisHealth = value; } + + /// Backing field for property. + private string _lastBackupStatus; + + /// Last backup operation status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LastBackupStatus { get => this._lastBackupStatus; set => this._lastBackupStatus = value; } + + /// Backing field for property. + private global::System.DateTime? _lastBackupTime; + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastBackupTime { get => this._lastBackupTime; } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItemExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Internal Acessors for ExtendedProperty + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.ExtendedProperty { get => (this._extendedProperty = this._extendedProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ExtendedProperties()); set { {_extendedProperty = value;} } } + + /// Internal Acessors for ExtendedPropertyDiskExclusionProperty + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.ExtendedPropertyDiskExclusionProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal)ExtendedProperty).DiskExclusionProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal)ExtendedProperty).DiskExclusionProperty = value; } + + /// Internal Acessors for FriendlyName + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.FriendlyName { get => this._friendlyName; set { {_friendlyName = value;} } } + + /// Internal Acessors for HealthStatus + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.HealthStatus { get => this._healthStatus; set { {_healthStatus = value;} } } + + /// Internal Acessors for LastBackupTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.LastBackupTime { get => this._lastBackupTime; set { {_lastBackupTime = value;} } } + + /// Internal Acessors for ProtectedItemDataId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.ProtectedItemDataId { get => this._protectedItemDataId; set { {_protectedItemDataId = value;} } } + + /// Internal Acessors for VirtualMachineId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemInternal.VirtualMachineId { get => this._virtualMachineId; set { {_virtualMachineId = value;} } } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType = value; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName = value ?? null; } + + /// Backing field for property. + private string _protectedItemDataId; + + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectedItemDataId { get => this._protectedItemDataId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? _protectionState; + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// Backing field for property. + private string _protectionStatus; + + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectionStatus { get => this._protectionStatus; set => this._protectionStatus = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; } + + /// Backing field for property. + private string _virtualMachineId; + + /// Fully qualified ARM ID of the virtual machine represented by this item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualMachineId { get => this._virtualMachineId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; } + + /// Creates an new instance. + public AzureIaaSvmProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectedItem), __protectedItem); + await eventListener.AssertObjectIsValid(nameof(__protectedItem), __protectedItem); + } + } + /// IaaS VM workload-specific backup item. + public partial interface IAzureIaaSvmProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem + { + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection.", + SerializedName = @"diskLunList", + PossibleTypes = new [] { typeof(int) })] + int[] DiskExclusionPropertyDiskLunList { get; set; } + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to indicate whether DiskLunList is to be included/ excluded from backup.", + SerializedName = @"isInclusionList", + PossibleTypes = new [] { typeof(bool) })] + bool? DiskExclusionPropertyIsInclusionList { get; set; } + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The latest backup copy available for this backup item in archive tier", + SerializedName = @"newestRecoveryPointInArchive", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item across all tiers.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item in archive tier", + SerializedName = @"oldestRecoveryPointInArchive", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item in vault tier", + SerializedName = @"oldestRecoveryPointInVault", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get; set; } + /// Specifies if backup policy associated with the backup item is inconsistent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if backup policy associated with the backup item is inconsistent.", + SerializedName = @"policyInconsistent", + PossibleTypes = new [] { typeof(bool) })] + bool? ExtendedInfoPolicyInconsistent { get; set; } + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of backup copies available for this backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoRecoveryPointCount { get; set; } + /// Linux VM name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Linux VM name", + SerializedName = @"linuxVmApplicationName", + PossibleTypes = new [] { typeof(string) })] + string ExtendedPropertyLinuxVMApplicationName { get; set; } + /// Friendly name of the VM represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Friendly name of the VM represented by this backup item.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; } + /// Health details on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health details on this backup item.", + SerializedName = @"healthDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] HealthDetail { get; set; } + /// Health status of protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Health status of protected item.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus? HealthStatus { get; } + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health details of different KPIs", + SerializedName = @"kpisHealths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths KpisHealth { get; set; } + /// Last backup operation status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last backup operation status.", + SerializedName = @"lastBackupStatus", + PossibleTypes = new [] { typeof(string) })] + string LastBackupStatus { get; set; } + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Timestamp of the last backup operation on this backup item.", + SerializedName = @"lastBackupTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastBackupTime { get; } + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Data ID of the protected item.", + SerializedName = @"protectedItemDataId", + PossibleTypes = new [] { typeof(string) })] + string ProtectedItemDataId { get; } + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup state of this backup item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get; set; } + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup status of this backup item.", + SerializedName = @"protectionStatus", + PossibleTypes = new [] { typeof(string) })] + string ProtectionStatus { get; set; } + /// Fully qualified ARM ID of the virtual machine represented by this item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Fully qualified ARM ID of the virtual machine represented by this item.", + SerializedName = @"virtualMachineId", + PossibleTypes = new [] { typeof(string) })] + string VirtualMachineId { get; } + + } + /// IaaS VM workload-specific backup item. + internal partial interface IAzureIaaSvmProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal + { + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + int[] DiskExclusionPropertyDiskLunList { get; set; } + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + bool? DiskExclusionPropertyIsInclusionList { get; set; } + /// Additional information for this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo ExtendedInfo { get; set; } + /// The latest backup copy available for this backup item in archive tier + global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item across all tiers. + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// The oldest backup copy available for this backup item in archive tier + global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item in vault tier + global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get; set; } + /// Specifies if backup policy associated with the backup item is inconsistent. + bool? ExtendedInfoPolicyInconsistent { get; set; } + /// Number of backup copies available for this backup item. + int? ExtendedInfoRecoveryPointCount { get; set; } + /// Extended Properties for Azure IaasVM Backup. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties ExtendedProperty { get; set; } + /// Extended Properties for Disk Exclusion. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties ExtendedPropertyDiskExclusionProperty { get; set; } + /// Linux VM name + string ExtendedPropertyLinuxVMApplicationName { get; set; } + /// Friendly name of the VM represented by this backup item. + string FriendlyName { get; set; } + /// Health details on this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] HealthDetail { get; set; } + /// Health status of protected item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus? HealthStatus { get; set; } + /// Health details of different KPIs + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths KpisHealth { get; set; } + /// Last backup operation status. + string LastBackupStatus { get; set; } + /// Timestamp of the last backup operation on this backup item. + global::System.DateTime? LastBackupTime { get; set; } + /// Data ID of the protected item. + string ProtectedItemDataId { get; set; } + /// Backup state of this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get; set; } + /// Backup status of this backup item. + string ProtectionStatus { get; set; } + /// Fully qualified ARM ID of the virtual machine represented by this item. + string VirtualMachineId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItem.json.cs new file mode 100644 index 000000000000..7578fa275faf --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItem.json.cs @@ -0,0 +1,174 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item. + public partial class AzureIaaSvmProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSvmProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItemExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_extendedProperty = If( json?.PropertyT("extendedProperties"), out var __jsonExtendedProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ExtendedProperties.FromJson(__jsonExtendedProperties) : ExtendedProperty;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_virtualMachineId = If( json?.PropertyT("virtualMachineId"), out var __jsonVirtualMachineId) ? (string)__jsonVirtualMachineId : (string)VirtualMachineId;} + {_protectionStatus = If( json?.PropertyT("protectionStatus"), out var __jsonProtectionStatus) ? (string)__jsonProtectionStatus : (string)ProtectionStatus;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + {_healthStatus = If( json?.PropertyT("healthStatus"), out var __jsonHealthStatus) ? (string)__jsonHealthStatus : (string)HealthStatus;} + {_healthDetail = If( json?.PropertyT("healthDetails"), out var __jsonHealthDetails) ? If( __jsonHealthDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceHealthDetails.FromJson(__u) )) ))() : null : HealthDetail;} + {_kpisHealth = If( json?.PropertyT("kpisHealths"), out var __jsonKpisHealths) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItemKpisHealths.FromJson(__jsonKpisHealths) : KpisHealth;} + {_lastBackupStatus = If( json?.PropertyT("lastBackupStatus"), out var __jsonLastBackupStatus) ? (string)__jsonLastBackupStatus : (string)LastBackupStatus;} + {_lastBackupTime = If( json?.PropertyT("lastBackupTime"), out var __jsonLastBackupTime) ? global::System.DateTime.TryParse((string)__jsonLastBackupTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastBackupTimeValue) ? __jsonLastBackupTimeValue : LastBackupTime : LastBackupTime;} + {_protectedItemDataId = If( json?.PropertyT("protectedItemDataId"), out var __jsonProtectedItemDataId) ? (string)__jsonProtectedItemDataId : (string)ProtectedItemDataId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItem. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItem interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("protectedItemType") ) + { + case "Microsoft.ClassicCompute/virtualMachines": + { + return new AzureIaaSClassicComputeVmprotectedItem(json); + } + case "Microsoft.Compute/virtualMachines": + { + return new AzureIaaSComputeVmprotectedItem(json); + } + } + return new AzureIaaSvmProtectedItem(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectedItem?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != this._extendedProperty ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedProperty.ToJson(null,serializationMode) : null, "extendedProperties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._virtualMachineId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualMachineId.ToString()) : null, "virtualMachineId" ,container.Add ); + } + AddIf( null != (((object)this._protectionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionStatus.ToString()) : null, "protectionStatus" ,container.Add ); + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._healthStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._healthStatus.ToString()) : null, "healthStatus" ,container.Add ); + } + if (null != this._healthDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._healthDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("healthDetails",__w); + } + AddIf( null != this._kpisHealth ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._kpisHealth.ToJson(null,serializationMode) : null, "kpisHealths" ,container.Add ); + AddIf( null != (((object)this._lastBackupStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupStatus.ToString()) : null, "lastBackupStatus" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._lastBackupTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastBackupTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._protectedItemDataId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectedItemDataId.ToString()) : null, "protectedItemDataId" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemExtendedInfo.cs new file mode 100644 index 000000000000..fd69dce6c745 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemExtendedInfo.cs @@ -0,0 +1,136 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on Azure IaaS VM specific backup item. + public partial class AzureIaaSvmProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfoInternal + { + + /// Backing field for property. + private global::System.DateTime? _newestRecoveryPointInArchive; + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? NewestRecoveryPointInArchive { get => this._newestRecoveryPointInArchive; set => this._newestRecoveryPointInArchive = value; } + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPoint; + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPoint { get => this._oldestRecoveryPoint; set => this._oldestRecoveryPoint = value; } + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPointInArchive; + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPointInArchive { get => this._oldestRecoveryPointInArchive; set => this._oldestRecoveryPointInArchive = value; } + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPointInVault; + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPointInVault { get => this._oldestRecoveryPointInVault; set => this._oldestRecoveryPointInVault = value; } + + /// Backing field for property. + private bool? _policyInconsistent; + + /// Specifies if backup policy associated with the backup item is inconsistent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? PolicyInconsistent { get => this._policyInconsistent; set => this._policyInconsistent = value; } + + /// Backing field for property. + private int? _recoveryPointCount; + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? RecoveryPointCount { get => this._recoveryPointCount; set => this._recoveryPointCount = value; } + + /// Creates an new instance. + public AzureIaaSvmProtectedItemExtendedInfo() + { + + } + } + /// Additional information on Azure IaaS VM specific backup item. + public partial interface IAzureIaaSvmProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The latest backup copy available for this backup item in archive tier", + SerializedName = @"newestRecoveryPointInArchive", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? NewestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item across all tiers.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item in archive tier", + SerializedName = @"oldestRecoveryPointInArchive", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item in vault tier", + SerializedName = @"oldestRecoveryPointInVault", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPointInVault { get; set; } + /// Specifies if backup policy associated with the backup item is inconsistent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if backup policy associated with the backup item is inconsistent.", + SerializedName = @"policyInconsistent", + PossibleTypes = new [] { typeof(bool) })] + bool? PolicyInconsistent { get; set; } + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of backup copies available for this backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? RecoveryPointCount { get; set; } + + } + /// Additional information on Azure IaaS VM specific backup item. + internal partial interface IAzureIaaSvmProtectedItemExtendedInfoInternal + + { + /// The latest backup copy available for this backup item in archive tier + global::System.DateTime? NewestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item across all tiers. + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// The oldest backup copy available for this backup item in archive tier + global::System.DateTime? OldestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item in vault tier + global::System.DateTime? OldestRecoveryPointInVault { get; set; } + /// Specifies if backup policy associated with the backup item is inconsistent. + bool? PolicyInconsistent { get; set; } + /// Number of backup copies available for this backup item. + int? RecoveryPointCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemExtendedInfo.json.cs new file mode 100644 index 000000000000..d5f8dc9ff1a9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemExtendedInfo.json.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on Azure IaaS VM specific backup item. + public partial class AzureIaaSvmProtectedItemExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSvmProtectedItemExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_oldestRecoveryPoint = If( json?.PropertyT("oldestRecoveryPoint"), out var __jsonOldestRecoveryPoint) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPoint, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointValue) ? __jsonOldestRecoveryPointValue : OldestRecoveryPoint : OldestRecoveryPoint;} + {_oldestRecoveryPointInVault = If( json?.PropertyT("oldestRecoveryPointInVault"), out var __jsonOldestRecoveryPointInVault) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPointInVault, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointInVaultValue) ? __jsonOldestRecoveryPointInVaultValue : OldestRecoveryPointInVault : OldestRecoveryPointInVault;} + {_oldestRecoveryPointInArchive = If( json?.PropertyT("oldestRecoveryPointInArchive"), out var __jsonOldestRecoveryPointInArchive) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPointInArchive, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointInArchiveValue) ? __jsonOldestRecoveryPointInArchiveValue : OldestRecoveryPointInArchive : OldestRecoveryPointInArchive;} + {_newestRecoveryPointInArchive = If( json?.PropertyT("newestRecoveryPointInArchive"), out var __jsonNewestRecoveryPointInArchive) ? global::System.DateTime.TryParse((string)__jsonNewestRecoveryPointInArchive, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonNewestRecoveryPointInArchiveValue) ? __jsonNewestRecoveryPointInArchiveValue : NewestRecoveryPointInArchive : NewestRecoveryPointInArchive;} + {_recoveryPointCount = If( json?.PropertyT("recoveryPointCount"), out var __jsonRecoveryPointCount) ? (int?)__jsonRecoveryPointCount : RecoveryPointCount;} + {_policyInconsistent = If( json?.PropertyT("policyInconsistent"), out var __jsonPolicyInconsistent) ? (bool?)__jsonPolicyInconsistent : PolicyInconsistent;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmProtectedItemExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._oldestRecoveryPoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPoint?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPoint" ,container.Add ); + AddIf( null != this._oldestRecoveryPointInVault ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPointInVault?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPointInVault" ,container.Add ); + AddIf( null != this._oldestRecoveryPointInArchive ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPointInArchive?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPointInArchive" ,container.Add ); + AddIf( null != this._newestRecoveryPointInArchive ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._newestRecoveryPointInArchive?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "newestRecoveryPointInArchive" ,container.Add ); + AddIf( null != this._recoveryPointCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._recoveryPointCount) : null, "recoveryPointCount" ,container.Add ); + AddIf( null != this._policyInconsistent ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._policyInconsistent) : null, "policyInconsistent" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemKpisHealths.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemKpisHealths.cs new file mode 100644 index 000000000000..4a24212e8bc0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemKpisHealths.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Health details of different KPIs + public partial class AzureIaaSvmProtectedItemKpisHealths : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealthsInternal + { + + /// Creates an new instance. + public AzureIaaSvmProtectedItemKpisHealths() + { + + } + } + /// Health details of different KPIs + public partial interface IAzureIaaSvmProtectedItemKpisHealths : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Health details of different KPIs + internal partial interface IAzureIaaSvmProtectedItemKpisHealthsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemKpisHealths.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemKpisHealths.dictionary.cs new file mode 100644 index 000000000000..b476223a4b94 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemKpisHealths.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureIaaSvmProtectedItemKpisHealths : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectedItemKpisHealths source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemKpisHealths.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemKpisHealths.json.cs new file mode 100644 index 000000000000..ddb9adbc9694 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectedItemKpisHealths.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Health details of different KPIs + public partial class AzureIaaSvmProtectedItemKpisHealths + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureIaaSvmProtectedItemKpisHealths(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.KpiResourceHealthDetails.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectedItemKpisHealths FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmProtectedItemKpisHealths(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicy.cs new file mode 100644 index 000000000000..2eca6e47782e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicy.cs @@ -0,0 +1,269 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup policy. + public partial class AzureIaaSvmProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetails _instantRpDetail; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetails InstantRpDetail { get => (this._instantRpDetail = this._instantRpDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InstantRpAdditionalDetails()); set => this._instantRpDetail = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string InstantRpDetailAzureBackupRgNamePrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetailsInternal)InstantRpDetail).AzureBackupRgNamePrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetailsInternal)InstantRpDetail).AzureBackupRgNamePrefix = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string InstantRpDetailAzureBackupRgNameSuffix { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetailsInternal)InstantRpDetail).AzureBackupRgNameSuffix; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetailsInternal)InstantRpDetail).AzureBackupRgNameSuffix = value ?? null; } + + /// Backing field for property. + private int? _instantRpRetentionRangeInDay; + + /// Instant RP retention policy range in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? InstantRpRetentionRangeInDay { get => this._instantRpRetentionRangeInDay; set => this._instantRpRetentionRangeInDay = value; } + + /// Internal Acessors for InstantRpDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyInternal.InstantRpDetail { get => (this._instantRpDetail = this._instantRpDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InstantRpAdditionalDetails()); set { {_instantRpDetail = value;} } } + + /// Internal Acessors for RetentionPolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyInternal.RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set { {_retentionPolicy = value;} } } + + /// Internal Acessors for SchedulePolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyInternal.SchedulePolicy { get => (this._schedulePolicy = this._schedulePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy()); set { {_schedulePolicy = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType? _policyType; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType? PolicyType { get => this._policyType; set => this._policyType = value; } + + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount = value ?? default(int); } + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy _retentionPolicy; + + /// Retention policy with the details on backup copy retention ranges. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set => this._retentionPolicy = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RetentionPolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy _schedulePolicy; + + /// Backup schedule specified as part of backup policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy SchedulePolicy { get => (this._schedulePolicy = this._schedulePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy()); set => this._schedulePolicy = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SchedulePolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)SchedulePolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)SchedulePolicy).Type = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType? _snapshotConsistencyType; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType? SnapshotConsistencyType { get => this._snapshotConsistencyType; set => this._snapshotConsistencyType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicy _tieringPolicy; + + /// + /// Tiering policy to automatically move RPs to another tier + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicy TieringPolicy { get => (this._tieringPolicy = this._tieringPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectionPolicyTieringPolicy()); set => this._tieringPolicy = value; } + + /// Backing field for property. + private string _timeZone; + + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Creates an new instance. + public AzureIaaSvmProtectionPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionPolicy), __protectionPolicy); + await eventListener.AssertObjectIsValid(nameof(__protectionPolicy), __protectionPolicy); + } + } + /// IaaS VM workload-specific backup policy. + public partial interface IAzureIaaSvmProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"azureBackupRGNamePrefix", + PossibleTypes = new [] { typeof(string) })] + string InstantRpDetailAzureBackupRgNamePrefix { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"azureBackupRGNameSuffix", + PossibleTypes = new [] { typeof(string) })] + string InstantRpDetailAzureBackupRgNameSuffix { get; set; } + /// Instant RP retention policy range in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Instant RP retention policy range in days", + SerializedName = @"instantRpRetentionRangeInDays", + PossibleTypes = new [] { typeof(int) })] + int? InstantRpRetentionRangeInDay { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"policyType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType? PolicyType { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"retentionPolicyType", + PossibleTypes = new [] { typeof(string) })] + string RetentionPolicyType { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"schedulePolicyType", + PossibleTypes = new [] { typeof(string) })] + string SchedulePolicyType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"snapshotConsistencyType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType? SnapshotConsistencyType { get; set; } + /// + /// Tiering policy to automatically move RPs to another tier + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tiering policy to automatically move RPs to another tier + Key is Target Tier, defined in RecoveryPointTierType enum. + Tiering policy specifies the criteria to move RP to the target tier.", + SerializedName = @"tieringPolicy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicy TieringPolicy { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"TimeZone optional input as string. For example: TimeZone = ""Pacific Standard Time"".", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + + } + /// IaaS VM workload-specific backup policy. + internal partial interface IAzureIaaSvmProtectionPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal + { + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetails InstantRpDetail { get; set; } + + string InstantRpDetailAzureBackupRgNamePrefix { get; set; } + + string InstantRpDetailAzureBackupRgNameSuffix { get; set; } + /// Instant RP retention policy range in days + int? InstantRpRetentionRangeInDay { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType? PolicyType { get; set; } + /// Retention policy with the details on backup copy retention ranges. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string RetentionPolicyType { get; set; } + /// Backup schedule specified as part of backup policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy SchedulePolicy { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string SchedulePolicyType { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType? SnapshotConsistencyType { get; set; } + /// + /// Tiering policy to automatically move RPs to another tier + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicy TieringPolicy { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + string TimeZone { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicy.json.cs new file mode 100644 index 000000000000..3fb2e090a1a4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicy.json.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup policy. + public partial class AzureIaaSvmProtectionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureIaaSvmProtectionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(json); + {_instantRpDetail = If( json?.PropertyT("instantRPDetails"), out var __jsonInstantRpDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InstantRpAdditionalDetails.FromJson(__jsonInstantRpDetails) : InstantRpDetail;} + {_schedulePolicy = If( json?.PropertyT("schedulePolicy"), out var __jsonSchedulePolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy.FromJson(__jsonSchedulePolicy) : SchedulePolicy;} + {_retentionPolicy = If( json?.PropertyT("retentionPolicy"), out var __jsonRetentionPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy.FromJson(__jsonRetentionPolicy) : RetentionPolicy;} + {_tieringPolicy = If( json?.PropertyT("tieringPolicy"), out var __jsonTieringPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectionPolicyTieringPolicy.FromJson(__jsonTieringPolicy) : TieringPolicy;} + {_instantRpRetentionRangeInDay = If( json?.PropertyT("instantRpRetentionRangeInDays"), out var __jsonInstantRpRetentionRangeInDays) ? (int?)__jsonInstantRpRetentionRangeInDays : InstantRpRetentionRangeInDay;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + {_policyType = If( json?.PropertyT("policyType"), out var __jsonPolicyType) ? (string)__jsonPolicyType : (string)PolicyType;} + {_snapshotConsistencyType = If( json?.PropertyT("snapshotConsistencyType"), out var __jsonSnapshotConsistencyType) ? (string)__jsonSnapshotConsistencyType : (string)SnapshotConsistencyType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmProtectionPolicy(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionPolicy?.ToJson(container, serializationMode); + AddIf( null != this._instantRpDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._instantRpDetail.ToJson(null,serializationMode) : null, "instantRPDetails" ,container.Add ); + AddIf( null != this._schedulePolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._schedulePolicy.ToJson(null,serializationMode) : null, "schedulePolicy" ,container.Add ); + AddIf( null != this._retentionPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionPolicy.ToJson(null,serializationMode) : null, "retentionPolicy" ,container.Add ); + AddIf( null != this._tieringPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._tieringPolicy.ToJson(null,serializationMode) : null, "tieringPolicy" ,container.Add ); + AddIf( null != this._instantRpRetentionRangeInDay ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._instantRpRetentionRangeInDay) : null, "instantRpRetentionRangeInDays" ,container.Add ); + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + AddIf( null != (((object)this._policyType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyType.ToString()) : null, "policyType" ,container.Add ); + AddIf( null != (((object)this._snapshotConsistencyType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._snapshotConsistencyType.ToString()) : null, "snapshotConsistencyType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicyTieringPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicyTieringPolicy.cs new file mode 100644 index 000000000000..34c67442f446 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicyTieringPolicy.cs @@ -0,0 +1,45 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Tiering policy to automatically move RPs to another tier + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + public partial class AzureIaaSvmProtectionPolicyTieringPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicyInternal + { + + /// + /// Creates an new instance. + /// + public AzureIaaSvmProtectionPolicyTieringPolicy() + { + + } + } + /// Tiering policy to automatically move RPs to another tier + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + public partial interface IAzureIaaSvmProtectionPolicyTieringPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Tiering policy to automatically move RPs to another tier + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + internal partial interface IAzureIaaSvmProtectionPolicyTieringPolicyInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicyTieringPolicy.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicyTieringPolicy.dictionary.cs new file mode 100644 index 000000000000..fc79e2ea46a0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicyTieringPolicy.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureIaaSvmProtectionPolicyTieringPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureIaaSvmProtectionPolicyTieringPolicy source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicyTieringPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicyTieringPolicy.json.cs new file mode 100644 index 000000000000..4cc9da89a474 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureIaaSvmProtectionPolicyTieringPolicy.json.cs @@ -0,0 +1,115 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Tiering policy to automatically move RPs to another tier + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + public partial class AzureIaaSvmProtectionPolicyTieringPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureIaaSvmProtectionPolicyTieringPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TieringPolicy.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureIaaSvmProtectionPolicyTieringPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureIaaSvmProtectionPolicyTieringPolicy(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureRecoveryServiceVaultProtectionIntent.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureRecoveryServiceVaultProtectionIntent.cs new file mode 100644 index 000000000000..d2c0b89d8fe8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureRecoveryServiceVaultProtectionIntent.cs @@ -0,0 +1,81 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Recovery Services Vault specific protection intent item. + public partial class AzureRecoveryServiceVaultProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureRecoveryServiceVaultProtectionIntent, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureRecoveryServiceVaultProtectionIntentInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent __protectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ItemId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemId = value ?? null; } + + /// backup protectionIntent type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType ItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemType = value ; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).PolicyId = value ?? null; } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).SourceResourceId = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureRecoveryServiceVaultProtectionIntent() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionIntent), __protectionIntent); + await eventListener.AssertObjectIsValid(nameof(__protectionIntent), __protectionIntent); + } + } + /// Azure Recovery Services Vault specific protection intent item. + public partial interface IAzureRecoveryServiceVaultProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent + { + + } + /// Azure Recovery Services Vault specific protection intent item. + internal partial interface IAzureRecoveryServiceVaultProtectionIntentInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureRecoveryServiceVaultProtectionIntent.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureRecoveryServiceVaultProtectionIntent.json.cs new file mode 100644 index 000000000000..60580d4b465e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureRecoveryServiceVaultProtectionIntent.json.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Recovery Services Vault specific protection intent item. + public partial class AzureRecoveryServiceVaultProtectionIntent + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureRecoveryServiceVaultProtectionIntent(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureRecoveryServiceVaultProtectionIntent. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureRecoveryServiceVaultProtectionIntent + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureRecoveryServiceVaultProtectionIntent. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureRecoveryServiceVaultProtectionIntent FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("protectionIntentItemType") ) + { + case "AzureWorkloadSQLAutoProtectionIntent": + { + return new AzureWorkloadSqlAutoProtectionIntent(json); + } + } + return new AzureRecoveryServiceVaultProtectionIntent(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionIntent?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureResourceProtectionIntent.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureResourceProtectionIntent.cs new file mode 100644 index 000000000000..b944c860b28e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureResourceProtectionIntent.cs @@ -0,0 +1,96 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM specific backup protection intent item. + public partial class AzureResourceProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureResourceProtectionIntent, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureResourceProtectionIntentInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent __protectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the VM represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ItemId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemId = value ?? null; } + + /// backup protectionIntent type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType ItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemType = value ; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).PolicyId = value ?? null; } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).SourceResourceId = value ?? null; } + + /// Creates an new instance. + public AzureResourceProtectionIntent() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionIntent), __protectionIntent); + await eventListener.AssertObjectIsValid(nameof(__protectionIntent), __protectionIntent); + } + } + /// IaaS VM specific backup protection intent item. + public partial interface IAzureResourceProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent + { + /// Friendly name of the VM represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the VM represented by this backup item.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + + } + /// IaaS VM specific backup protection intent item. + internal partial interface IAzureResourceProtectionIntentInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal + { + /// Friendly name of the VM represented by this backup item. + string FriendlyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureResourceProtectionIntent.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureResourceProtectionIntent.json.cs new file mode 100644 index 000000000000..0407aca40ed6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureResourceProtectionIntent.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM specific backup protection intent item. + public partial class AzureResourceProtectionIntent + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureResourceProtectionIntent(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent(json); + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureResourceProtectionIntent. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureResourceProtectionIntent. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureResourceProtectionIntent FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureResourceProtectionIntent(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionIntent?.ToJson(container, serializationMode); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlContainer.cs new file mode 100644 index 000000000000..97b453f9f514 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlContainer.cs @@ -0,0 +1,82 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Sql workload-specific container. + public partial class AzureSqlContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType = value ; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus = value ?? null; } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus = value ?? null; } + + /// Creates an new instance. + public AzureSqlContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionContainer), __protectionContainer); + await eventListener.AssertObjectIsValid(nameof(__protectionContainer), __protectionContainer); + } + } + /// Azure Sql workload-specific container. + public partial interface IAzureSqlContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer + { + + } + /// Azure Sql workload-specific container. + internal partial interface IAzureSqlContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlContainer.json.cs new file mode 100644 index 000000000000..a0cf18dec897 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlContainer.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Sql workload-specific container. + public partial class AzureSqlContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureSqlContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlContainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureSqlContainer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionContainer?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItem.cs new file mode 100644 index 000000000000..d8b0d5335832 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItem.cs @@ -0,0 +1,234 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure SQL workload-specific backup item. + public partial class AzureSqlProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfo _extendedInfo; + + /// Additional information for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureSqlProtectedItemExtendedInfo()); set => this._extendedInfo = value; } + + /// The oldest backup copy available for this item in the service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// State of the backup policy associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoPolicyState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfoInternal)ExtendedInfo).PolicyState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfoInternal)ExtendedInfo).PolicyState = value ?? null; } + + /// Number of available backup copies associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount = value ?? default(int); } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureSqlProtectedItemExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType = value; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName = value ?? null; } + + /// Backing field for property. + private string _protectedItemDataId; + + /// + /// Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectedItemDataId { get => this._protectedItemDataId; set => this._protectedItemDataId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState? _protectionState; + + /// Backup state of the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState? ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; } + + /// Creates an new instance. + public AzureSqlProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectedItem), __protectedItem); + await eventListener.AssertObjectIsValid(nameof(__protectedItem), __protectedItem); + } + } + /// Azure SQL workload-specific backup item. + public partial interface IAzureSqlProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem + { + /// The oldest backup copy available for this item in the service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this item in the service.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// State of the backup policy associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"State of the backup policy associated with this backup item.", + SerializedName = @"policyState", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoPolicyState { get; set; } + /// Number of available backup copies associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of available backup copies associated with this backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoRecoveryPointCount { get; set; } + /// + /// Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services.", + SerializedName = @"protectedItemDataId", + PossibleTypes = new [] { typeof(string) })] + string ProtectedItemDataId { get; set; } + /// Backup state of the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup state of the backed up item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState? ProtectionState { get; set; } + + } + /// Azure SQL workload-specific backup item. + internal partial interface IAzureSqlProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal + { + /// Additional information for this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfo ExtendedInfo { get; set; } + /// The oldest backup copy available for this item in the service. + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// State of the backup policy associated with this backup item. + string ExtendedInfoPolicyState { get; set; } + /// Number of available backup copies associated with this backup item. + int? ExtendedInfoRecoveryPointCount { get; set; } + /// + /// Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. + /// + string ProtectedItemDataId { get; set; } + /// Backup state of the backed up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState? ProtectionState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItem.json.cs new file mode 100644 index 000000000000..b3e7a55bc299 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItem.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure SQL workload-specific backup item. + public partial class AzureSqlProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureSqlProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureSqlProtectedItemExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_protectedItemDataId = If( json?.PropertyT("protectedItemDataId"), out var __jsonProtectedItemDataId) ? (string)__jsonProtectedItemDataId : (string)ProtectedItemDataId;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureSqlProtectedItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectedItem?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != (((object)this._protectedItemDataId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectedItemDataId.ToString()) : null, "protectedItemDataId" ,container.Add ); + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItemExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItemExtendedInfo.cs new file mode 100644 index 000000000000..29c0362b2b2f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItemExtendedInfo.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on Azure Sql specific protected item. + public partial class AzureSqlProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfoInternal + { + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPoint; + + /// The oldest backup copy available for this item in the service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPoint { get => this._oldestRecoveryPoint; set => this._oldestRecoveryPoint = value; } + + /// Backing field for property. + private string _policyState; + + /// State of the backup policy associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyState { get => this._policyState; set => this._policyState = value; } + + /// Backing field for property. + private int? _recoveryPointCount; + + /// Number of available backup copies associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? RecoveryPointCount { get => this._recoveryPointCount; set => this._recoveryPointCount = value; } + + /// Creates an new instance. + public AzureSqlProtectedItemExtendedInfo() + { + + } + } + /// Additional information on Azure Sql specific protected item. + public partial interface IAzureSqlProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The oldest backup copy available for this item in the service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this item in the service.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// State of the backup policy associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"State of the backup policy associated with this backup item.", + SerializedName = @"policyState", + PossibleTypes = new [] { typeof(string) })] + string PolicyState { get; set; } + /// Number of available backup copies associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of available backup copies associated with this backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? RecoveryPointCount { get; set; } + + } + /// Additional information on Azure Sql specific protected item. + internal partial interface IAzureSqlProtectedItemExtendedInfoInternal + + { + /// The oldest backup copy available for this item in the service. + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// State of the backup policy associated with this backup item. + string PolicyState { get; set; } + /// Number of available backup copies associated with this backup item. + int? RecoveryPointCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItemExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItemExtendedInfo.json.cs new file mode 100644 index 000000000000..bd9f5703cfd6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectedItemExtendedInfo.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on Azure Sql specific protected item. + public partial class AzureSqlProtectedItemExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureSqlProtectedItemExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_oldestRecoveryPoint = If( json?.PropertyT("oldestRecoveryPoint"), out var __jsonOldestRecoveryPoint) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPoint, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointValue) ? __jsonOldestRecoveryPointValue : OldestRecoveryPoint : OldestRecoveryPoint;} + {_recoveryPointCount = If( json?.PropertyT("recoveryPointCount"), out var __jsonRecoveryPointCount) ? (int?)__jsonRecoveryPointCount : RecoveryPointCount;} + {_policyState = If( json?.PropertyT("policyState"), out var __jsonPolicyState) ? (string)__jsonPolicyState : (string)PolicyState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectedItemExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureSqlProtectedItemExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._oldestRecoveryPoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPoint?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPoint" ,container.Add ); + AddIf( null != this._recoveryPointCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._recoveryPointCount) : null, "recoveryPointCount" ,container.Add ); + AddIf( null != (((object)this._policyState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyState.ToString()) : null, "policyState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectionPolicy.cs new file mode 100644 index 000000000000..18594d49aae2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectionPolicy.cs @@ -0,0 +1,99 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure SQL workload-specific backup policy. + public partial class AzureSqlProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectionPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType = value ; } + + /// Internal Acessors for RetentionPolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectionPolicyInternal.RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set { {_retentionPolicy = value;} } } + + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount = value ?? default(int); } + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy _retentionPolicy; + + /// Retention policy details. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set => this._retentionPolicy = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RetentionPolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type = value ?? null; } + + /// Creates an new instance. + public AzureSqlProtectionPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionPolicy), __protectionPolicy); + await eventListener.AssertObjectIsValid(nameof(__protectionPolicy), __protectionPolicy); + } + } + /// Azure SQL workload-specific backup policy. + public partial interface IAzureSqlProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"retentionPolicyType", + PossibleTypes = new [] { typeof(string) })] + string RetentionPolicyType { get; set; } + + } + /// Azure SQL workload-specific backup policy. + internal partial interface IAzureSqlProtectionPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal + { + /// Retention policy details. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string RetentionPolicyType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectionPolicy.json.cs new file mode 100644 index 000000000000..34b382ec39f0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlProtectionPolicy.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure SQL workload-specific backup policy. + public partial class AzureSqlProtectionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureSqlProtectionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(json); + {_retentionPolicy = If( json?.PropertyT("retentionPolicy"), out var __jsonRetentionPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy.FromJson(__jsonRetentionPolicy) : RetentionPolicy;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlProtectionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureSqlProtectionPolicy(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionPolicy?.ToJson(container, serializationMode); + AddIf( null != this._retentionPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionPolicy.ToJson(null,serializationMode) : null, "retentionPolicy" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlagWorkloadContainerProtectionContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlagWorkloadContainerProtectionContainer.cs new file mode 100644 index 000000000000..21d464f226c1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlagWorkloadContainerProtectionContainer.cs @@ -0,0 +1,157 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container for SQL workloads under SQL Availability Group. + public partial class AzureSqlagWorkloadContainerProtectionContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlagWorkloadContainerProtectionContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlagWorkloadContainerProtectionContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainer __azureWorkloadContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).ContainerType = value ; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailCode; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailMessage; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailRecommendation; } + + /// Additional details of a workload container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfo = value ?? null /* model class */; } + + /// + /// Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoHostServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoHostServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoHostServerName = value ?? null; } + + /// Inquiry Status for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo ExtendedInfoInquiryInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoInquiryInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoInquiryInfo = value ?? null /* model class */; } + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] ExtendedInfoNodesList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoNodesList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoNodesList = value ?? null /* arrayOf */; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).HealthStatus = value ?? null; } + + /// Error Details if the Status is non-success. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail InquiryInfoErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoErrorDetail = value ?? null /* model class */; } + + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryInfoInquiryDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoInquiryDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoInquiryDetail = value ?? null /* arrayOf */; } + + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string InquiryInfoStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoStatus = value ?? null; } + + /// Time stamp when this container was updated. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastUpdatedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).LastUpdatedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).LastUpdatedTime = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailCode = value; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailMessage = value; } + + /// Internal Acessors for ErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailRecommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailRecommendation = value; } + + /// Re-Do Operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? OperationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).OperationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).OperationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType)""); } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).ProtectableObjectType = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).RegistrationStatus = value ?? null; } + + /// ARM ID of the virtual machine represented by this Azure Workload Container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).SourceResourceId = value ?? null; } + + /// Workload type for which registration was sent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).WorkloadType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType)""); } + + /// + /// Creates an new instance. + /// + public AzureSqlagWorkloadContainerProtectionContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadContainer), __azureWorkloadContainer); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadContainer), __azureWorkloadContainer); + } + } + /// Container for SQL workloads under SQL Availability Group. + public partial interface IAzureSqlagWorkloadContainerProtectionContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainer + { + + } + /// Container for SQL workloads under SQL Availability Group. + internal partial interface IAzureSqlagWorkloadContainerProtectionContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlagWorkloadContainerProtectionContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlagWorkloadContainerProtectionContainer.json.cs new file mode 100644 index 000000000000..628908013718 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureSqlagWorkloadContainerProtectionContainer.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container for SQL workloads under SQL Availability Group. + public partial class AzureSqlagWorkloadContainerProtectionContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureSqlagWorkloadContainerProtectionContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadContainer(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlagWorkloadContainerProtectionContainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlagWorkloadContainerProtectionContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureSqlagWorkloadContainerProtectionContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureSqlagWorkloadContainerProtectionContainer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadContainer?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageContainer.cs new file mode 100644 index 000000000000..61a84247673c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageContainer.cs @@ -0,0 +1,184 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Storage Account workload-specific container. + public partial class AzureStorageContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock? _acquireStorageAccountLock; + + /// Whether storage account lock is to be acquired for this container or not. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock? AcquireStorageAccountLock { get => this._acquireStorageAccountLock; set => this._acquireStorageAccountLock = value; } + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType = value ; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? _operationType; + + /// Re-Do Operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? OperationType { get => this._operationType; set => this._operationType = value; } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType = value ?? null; } + + /// Backing field for property. + private long? _protectedItemCount; + + /// Number of items backed up in this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? ProtectedItemCount { get => this._protectedItemCount; set => this._protectedItemCount = value; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus = value ?? null; } + + /// Backing field for property. + private string _resourceGroup; + + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceGroup { get => this._resourceGroup; set => this._resourceGroup = value; } + + /// Backing field for property. + private string _sourceResourceId; + + /// Fully qualified ARM url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Backing field for property. + private string _storageAccountVersion; + + /// Storage account version. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string StorageAccountVersion { get => this._storageAccountVersion; set => this._storageAccountVersion = value; } + + /// Creates an new instance. + public AzureStorageContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionContainer), __protectionContainer); + await eventListener.AssertObjectIsValid(nameof(__protectionContainer), __protectionContainer); + } + } + /// Azure Storage Account workload-specific container. + public partial interface IAzureStorageContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer + { + /// Whether storage account lock is to be acquired for this container or not. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether storage account lock is to be acquired for this container or not.", + SerializedName = @"acquireStorageAccountLock", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock? AcquireStorageAccountLock { get; set; } + /// Re-Do Operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Re-Do Operation", + SerializedName = @"operationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? OperationType { get; set; } + /// Number of items backed up in this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of items backed up in this container.", + SerializedName = @"protectedItemCount", + PossibleTypes = new [] { typeof(long) })] + long? ProtectedItemCount { get; set; } + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource group name of Recovery Services Vault.", + SerializedName = @"resourceGroup", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroup { get; set; } + /// Fully qualified ARM url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM url.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + /// Storage account version. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage account version.", + SerializedName = @"storageAccountVersion", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountVersion { get; set; } + + } + /// Azure Storage Account workload-specific container. + internal partial interface IAzureStorageContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal + { + /// Whether storage account lock is to be acquired for this container or not. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock? AcquireStorageAccountLock { get; set; } + /// Re-Do Operation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? OperationType { get; set; } + /// Number of items backed up in this container. + long? ProtectedItemCount { get; set; } + /// Resource group name of Recovery Services Vault. + string ResourceGroup { get; set; } + /// Fully qualified ARM url. + string SourceResourceId { get; set; } + /// Storage account version. + string StorageAccountVersion { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageContainer.json.cs new file mode 100644 index 000000000000..23da2803d34c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageContainer.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Storage Account workload-specific container. + public partial class AzureStorageContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureStorageContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(json); + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + {_storageAccountVersion = If( json?.PropertyT("storageAccountVersion"), out var __jsonStorageAccountVersion) ? (string)__jsonStorageAccountVersion : (string)StorageAccountVersion;} + {_resourceGroup = If( json?.PropertyT("resourceGroup"), out var __jsonResourceGroup) ? (string)__jsonResourceGroup : (string)ResourceGroup;} + {_protectedItemCount = If( json?.PropertyT("protectedItemCount"), out var __jsonProtectedItemCount) ? (long?)__jsonProtectedItemCount : ProtectedItemCount;} + {_acquireStorageAccountLock = If( json?.PropertyT("acquireStorageAccountLock"), out var __jsonAcquireStorageAccountLock) ? (string)__jsonAcquireStorageAccountLock : (string)AcquireStorageAccountLock;} + {_operationType = If( json?.PropertyT("operationType"), out var __jsonOperationType) ? (string)__jsonOperationType : (string)OperationType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageContainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureStorageContainer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionContainer?.ToJson(container, serializationMode); + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AddIf( null != (((object)this._storageAccountVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageAccountVersion.ToString()) : null, "storageAccountVersion" ,container.Add ); + AddIf( null != (((object)this._resourceGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceGroup.ToString()) : null, "resourceGroup" ,container.Add ); + AddIf( null != this._protectedItemCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._protectedItemCount) : null, "protectedItemCount" ,container.Add ); + AddIf( null != (((object)this._acquireStorageAccountLock)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._acquireStorageAccountLock.ToString()) : null, "acquireStorageAccountLock" ,container.Add ); + AddIf( null != (((object)this._operationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._operationType.ToString()) : null, "operationType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageErrorInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageErrorInfo.cs new file mode 100644 index 000000000000..faf075c48c8d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageErrorInfo.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage specific error information + public partial class AzureStorageErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfoInternal + { + + /// Backing field for property. + private int? _errorCode; + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ErrorCode { get => this._errorCode; set => this._errorCode = value; } + + /// Backing field for property. + private string _errorString; + + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorString { get => this._errorString; set => this._errorString = value; } + + /// Backing field for property. + private string[] _recommendation; + + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Recommendation { get => this._recommendation; set => this._recommendation = value; } + + /// Creates an new instance. + public AzureStorageErrorInfo() + { + + } + } + /// Azure storage specific error information + public partial interface IAzureStorageErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error code.", + SerializedName = @"errorCode", + PossibleTypes = new [] { typeof(int) })] + int? ErrorCode { get; set; } + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Localized error string.", + SerializedName = @"errorString", + PossibleTypes = new [] { typeof(string) })] + string ErrorString { get; set; } + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of localized recommendations for above error code.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] Recommendation { get; set; } + + } + /// Azure storage specific error information + internal partial interface IAzureStorageErrorInfoInternal + + { + /// Error code. + int? ErrorCode { get; set; } + /// Localized error string. + string ErrorString { get; set; } + /// List of localized recommendations for above error code. + string[] Recommendation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageErrorInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageErrorInfo.json.cs new file mode 100644 index 000000000000..c83783236b18 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageErrorInfo.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage specific error information + public partial class AzureStorageErrorInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureStorageErrorInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorCode = If( json?.PropertyT("errorCode"), out var __jsonErrorCode) ? (int?)__jsonErrorCode : ErrorCode;} + {_errorString = If( json?.PropertyT("errorString"), out var __jsonErrorString) ? (string)__jsonErrorString : (string)ErrorString;} + {_recommendation = If( json?.PropertyT("recommendations"), out var __jsonRecommendations) ? If( __jsonRecommendations as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Recommendation;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureStorageErrorInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._errorCode ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._errorCode) : null, "errorCode" ,container.Add ); + AddIf( null != (((object)this._errorString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorString.ToString()) : null, "errorString" ,container.Add ); + if (null != this._recommendation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recommendation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("recommendations",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJob.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJob.cs new file mode 100644 index 000000000000..0a6dca84c8cf --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJob.cs @@ -0,0 +1,249 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage specific job. + public partial class AzureStorageJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJob, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] _actionsInfo; + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get => this._actionsInfo; set => this._actionsInfo = value; } + + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ActivityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId = value ?? null; } + + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime = value ?? default(global::System.DateTime); } + + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EntityFriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo[] _errorDetail; + + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo[] ErrorDetail { get => this._errorDetail; set => this._errorDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfo _extendedInfo; + + /// Additional information about the job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureStorageJobExtendedInfo()); set => this._extendedInfo = value; } + + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoDynamicErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage = value ?? null; } + + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoInternal)ExtendedInfo).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoInternal)ExtendedInfo).PropertyBag = value ?? null /* model class */; } + + /// List of tasks for this job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails[] ExtendedInfoTasksList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoInternal)ExtendedInfo).TasksList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoInternal)ExtendedInfo).TasksList = value ?? null /* arrayOf */; } + + /// Backing field for property. + private bool? _isUserTriggered; + + /// Indicated that whether the job is adhoc(true) or scheduled(false) + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsUserTriggered { get => this._isUserTriggered; set => this._isUserTriggered = value; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureStorageJobExtendedInfo()); set { {_extendedInfo = value;} } } + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation = value ?? null; } + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime = value ?? default(global::System.DateTime); } + + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status = value ?? null; } + + /// Backing field for property. + private string _storageAccountName; + + /// Specifies friendly name of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string StorageAccountName { get => this._storageAccountName; set => this._storageAccountName = value; } + + /// Backing field for property. + private string _storageAccountVersion; + + /// + /// Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string StorageAccountVersion { get => this._storageAccountVersion; set => this._storageAccountVersion = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type = value ; } + + /// Creates an new instance. + public AzureStorageJob() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__job), __job); + await eventListener.AssertObjectIsValid(nameof(__job), __job); + } + } + /// Azure storage specific job. + public partial interface IAzureStorageJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the state/actions applicable on this job like cancel/retry.", + SerializedName = @"actionsInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time elapsed during the execution of this job.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error details on execution of this job.", + SerializedName = @"errorDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo[] ErrorDetail { get; set; } + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message on job execution.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoDynamicErrorMessage { get; set; } + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks for this job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks for this job", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Indicated that whether the job is adhoc(true) or scheduled(false) + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicated that whether the job is adhoc(true) or scheduled(false)", + SerializedName = @"isUserTriggered", + PossibleTypes = new [] { typeof(bool) })] + bool? IsUserTriggered { get; set; } + /// Specifies friendly name of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies friendly name of the storage account.", + SerializedName = @"storageAccountName", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountName { get; set; } + /// + /// Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account.", + SerializedName = @"storageAccountVersion", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountVersion { get; set; } + + } + /// Azure storage specific job. + internal partial interface IAzureStorageJobInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Time elapsed during the execution of this job. + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo[] ErrorDetail { get; set; } + /// Additional information about the job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfo ExtendedInfo { get; set; } + /// Non localized error message on job execution. + string ExtendedInfoDynamicErrorMessage { get; set; } + /// Job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks for this job + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Indicated that whether the job is adhoc(true) or scheduled(false) + bool? IsUserTriggered { get; set; } + /// Specifies friendly name of the storage account. + string StorageAccountName { get; set; } + /// + /// Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. + /// + string StorageAccountVersion { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJob.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJob.json.cs new file mode 100644 index 000000000000..177b29f15e32 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJob.json.cs @@ -0,0 +1,138 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage specific job. + public partial class AzureStorageJob + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureStorageJob(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureStorageJobExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_actionsInfo = If( json?.PropertyT("actionsInfo"), out var __jsonActionsInfo) ? If( __jsonActionsInfo as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)""))) ))() : null : ActionsInfo;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? If( __jsonErrorDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageErrorInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureStorageErrorInfo.FromJson(__p) )) ))() : null : ErrorDetail;} + {_storageAccountName = If( json?.PropertyT("storageAccountName"), out var __jsonStorageAccountName) ? (string)__jsonStorageAccountName : (string)StorageAccountName;} + {_storageAccountVersion = If( json?.PropertyT("storageAccountVersion"), out var __jsonStorageAccountVersion) ? (string)__jsonStorageAccountVersion : (string)StorageAccountVersion;} + {_isUserTriggered = If( json?.PropertyT("isUserTriggered"), out var __jsonIsUserTriggered) ? (bool?)__jsonIsUserTriggered : IsUserTriggered;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJob. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJob. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureStorageJob(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __job?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + if (null != this._actionsInfo) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._actionsInfo ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("actionsInfo",__w); + } + if (null != this._errorDetail) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._errorDetail ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("errorDetails",__r); + } + AddIf( null != (((object)this._storageAccountName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageAccountName.ToString()) : null, "storageAccountName" ,container.Add ); + AddIf( null != (((object)this._storageAccountVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageAccountVersion.ToString()) : null, "storageAccountVersion" ,container.Add ); + AddIf( null != this._isUserTriggered ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isUserTriggered) : null, "isUserTriggered" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfo.cs new file mode 100644 index 000000000000..5bd1941f67d0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfo.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Storage workload-specific additional information for job. + public partial class AzureStorageJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoInternal + { + + /// Backing field for property. + private string _dynamicErrorMessage; + + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DynamicErrorMessage { get => this._dynamicErrorMessage; set => this._dynamicErrorMessage = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag _propertyBag; + + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag PropertyBag { get => (this._propertyBag = this._propertyBag ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureStorageJobExtendedInfoPropertyBag()); set => this._propertyBag = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails[] _tasksList; + + /// List of tasks for this job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails[] TasksList { get => this._tasksList; set => this._tasksList = value; } + + /// Creates an new instance. + public AzureStorageJobExtendedInfo() + { + + } + } + /// Azure Storage workload-specific additional information for job. + public partial interface IAzureStorageJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message on job execution.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string DynamicErrorMessage { get; set; } + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks for this job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks for this job", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails[] TasksList { get; set; } + + } + /// Azure Storage workload-specific additional information for job. + internal partial interface IAzureStorageJobExtendedInfoInternal + + { + /// Non localized error message on job execution. + string DynamicErrorMessage { get; set; } + /// Job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks for this job + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails[] TasksList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfo.json.cs new file mode 100644 index 000000000000..577f71267681 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfo.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Storage workload-specific additional information for job. + public partial class AzureStorageJobExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureStorageJobExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_tasksList = If( json?.PropertyT("tasksList"), out var __jsonTasksList) ? If( __jsonTasksList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureStorageJobTaskDetails.FromJson(__u) )) ))() : null : TasksList;} + {_propertyBag = If( json?.PropertyT("propertyBag"), out var __jsonPropertyBag) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureStorageJobExtendedInfoPropertyBag.FromJson(__jsonPropertyBag) : PropertyBag;} + {_dynamicErrorMessage = If( json?.PropertyT("dynamicErrorMessage"), out var __jsonDynamicErrorMessage) ? (string)__jsonDynamicErrorMessage : (string)DynamicErrorMessage;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureStorageJobExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._tasksList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._tasksList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tasksList",__w); + } + AddIf( null != this._propertyBag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._propertyBag.ToJson(null,serializationMode) : null, "propertyBag" ,container.Add ); + AddIf( null != (((object)this._dynamicErrorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dynamicErrorMessage.ToString()) : null, "dynamicErrorMessage" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfoPropertyBag.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfoPropertyBag.cs new file mode 100644 index 000000000000..04064016283a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfoPropertyBag.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job properties. + public partial class AzureStorageJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBagInternal + { + + /// Creates an new instance. + public AzureStorageJobExtendedInfoPropertyBag() + { + + } + } + /// Job properties. + public partial interface IAzureStorageJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Job properties. + internal partial interface IAzureStorageJobExtendedInfoPropertyBagInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfoPropertyBag.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfoPropertyBag.dictionary.cs new file mode 100644 index 000000000000..11f24562dcdc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfoPropertyBag.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureStorageJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureStorageJobExtendedInfoPropertyBag source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfoPropertyBag.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfoPropertyBag.json.cs new file mode 100644 index 000000000000..8cf22a2a2351 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobExtendedInfoPropertyBag.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job properties. + public partial class AzureStorageJobExtendedInfoPropertyBag + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureStorageJobExtendedInfoPropertyBag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobExtendedInfoPropertyBag FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureStorageJobExtendedInfoPropertyBag(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobTaskDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobTaskDetails.cs new file mode 100644 index 000000000000..a9de05f7c570 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobTaskDetails.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage workload specific job task details. + public partial class AzureStorageJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetailsInternal + { + + /// Backing field for property. + private string _status; + + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private string _taskId; + + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TaskId { get => this._taskId; set => this._taskId = value; } + + /// Creates an new instance. + public AzureStorageJobTaskDetails() + { + + } + } + /// Azure storage workload specific job task details. + public partial interface IAzureStorageJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The task display name.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; set; } + + } + /// Azure storage workload specific job task details. + internal partial interface IAzureStorageJobTaskDetailsInternal + + { + /// The status. + string Status { get; set; } + /// The task display name. + string TaskId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobTaskDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobTaskDetails.json.cs new file mode 100644 index 000000000000..fcbf59bc5fe4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageJobTaskDetails.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage workload specific job task details. + public partial class AzureStorageJobTaskDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureStorageJobTaskDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_taskId = If( json?.PropertyT("taskId"), out var __jsonTaskId) ? (string)__jsonTaskId : (string)TaskId;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageJobTaskDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureStorageJobTaskDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._taskId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._taskId.ToString()) : null, "taskId" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageProtectableContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageProtectableContainer.cs new file mode 100644 index 000000000000..07a036c38ab7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageProtectableContainer.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Storage-specific protectable containers + public partial class AzureStorageProtectableContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageProtectableContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageProtectableContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer __protectableContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectableContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Fabric Id of the container such as ARM Id. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).ContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).ContainerId = value ?? null; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).HealthStatus = value ?? null; } + + /// + /// Type of the container. The value of this property for + /// 1. Compute Azure VM is Microsoft.Compute/virtualMachines + /// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).Type = value ; } + + /// Creates an new instance. + public AzureStorageProtectableContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectableContainer), __protectableContainer); + await eventListener.AssertObjectIsValid(nameof(__protectableContainer), __protectableContainer); + } + } + /// Azure Storage-specific protectable containers + public partial interface IAzureStorageProtectableContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer + { + + } + /// Azure Storage-specific protectable containers + internal partial interface IAzureStorageProtectableContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageProtectableContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageProtectableContainer.json.cs new file mode 100644 index 000000000000..a54663af38be --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureStorageProtectableContainer.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Storage-specific protectable containers + public partial class AzureStorageProtectableContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureStorageProtectableContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectableContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectableContainer(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageProtectableContainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageProtectableContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureStorageProtectableContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureStorageProtectableContainer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectableContainer?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectableContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectableContainer.cs new file mode 100644 index 000000000000..4f663658a30b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectableContainer.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure workload-specific container + public partial class AzureVMAppContainerProtectableContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectableContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectableContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer __protectableContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectableContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Fabric Id of the container such as ARM Id. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).ContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).ContainerId = value ?? null; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).HealthStatus = value ?? null; } + + /// + /// Type of the container. The value of this property for + /// 1. Compute Azure VM is Microsoft.Compute/virtualMachines + /// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)__protectableContainer).Type = value ; } + + /// Creates an new instance. + public AzureVMAppContainerProtectableContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectableContainer), __protectableContainer); + await eventListener.AssertObjectIsValid(nameof(__protectableContainer), __protectableContainer); + } + } + /// Azure workload-specific container + public partial interface IAzureVMAppContainerProtectableContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer + { + + } + /// Azure workload-specific container + internal partial interface IAzureVMAppContainerProtectableContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectableContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectableContainer.json.cs new file mode 100644 index 000000000000..52eb71042a03 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectableContainer.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure workload-specific container + public partial class AzureVMAppContainerProtectableContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMAppContainerProtectableContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectableContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectableContainer(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectableContainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectableContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectableContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMAppContainerProtectableContainer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectableContainer?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectionContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectionContainer.cs new file mode 100644 index 000000000000..0d1546c7067c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectionContainer.cs @@ -0,0 +1,155 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container for SQL workloads under Azure Virtual Machines. + public partial class AzureVMAppContainerProtectionContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectionContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectionContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainer __azureWorkloadContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).ContainerType = value ; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailCode; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailMessage; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailRecommendation; } + + /// Additional details of a workload container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfo = value ?? null /* model class */; } + + /// + /// Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoHostServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoHostServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoHostServerName = value ?? null; } + + /// Inquiry Status for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo ExtendedInfoInquiryInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoInquiryInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoInquiryInfo = value ?? null /* model class */; } + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] ExtendedInfoNodesList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoNodesList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ExtendedInfoNodesList = value ?? null /* arrayOf */; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).HealthStatus = value ?? null; } + + /// Error Details if the Status is non-success. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail InquiryInfoErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoErrorDetail = value ?? null /* model class */; } + + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryInfoInquiryDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoInquiryDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoInquiryDetail = value ?? null /* arrayOf */; } + + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string InquiryInfoStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).InquiryInfoStatus = value ?? null; } + + /// Time stamp when this container was updated. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastUpdatedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).LastUpdatedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).LastUpdatedTime = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailCode = value; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailMessage = value; } + + /// Internal Acessors for ErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailRecommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).ErrorDetailRecommendation = value; } + + /// Re-Do Operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? OperationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).OperationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).OperationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType)""); } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).ProtectableObjectType = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__azureWorkloadContainer).RegistrationStatus = value ?? null; } + + /// ARM ID of the virtual machine represented by this Azure Workload Container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).SourceResourceId = value ?? null; } + + /// Workload type for which registration was sent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal)__azureWorkloadContainer).WorkloadType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType)""); } + + /// Creates an new instance. + public AzureVMAppContainerProtectionContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadContainer), __azureWorkloadContainer); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadContainer), __azureWorkloadContainer); + } + } + /// Container for SQL workloads under Azure Virtual Machines. + public partial interface IAzureVMAppContainerProtectionContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainer + { + + } + /// Container for SQL workloads under Azure Virtual Machines. + internal partial interface IAzureVMAppContainerProtectionContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectionContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectionContainer.json.cs new file mode 100644 index 000000000000..8c894730ac79 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMAppContainerProtectionContainer.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container for SQL workloads under Azure Virtual Machines. + public partial class AzureVMAppContainerProtectionContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMAppContainerProtectionContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadContainer(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectionContainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectionContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMAppContainerProtectionContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMAppContainerProtectionContainer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadContainer?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportRequest.cs new file mode 100644 index 000000000000..bc2781d85e30 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportRequest.cs @@ -0,0 +1,91 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureResource(IaaS VM) Specific feature support request + public partial class AzureVMResourceFeatureSupportRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest __featureSupportRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FeatureSupportRequest(); + + /// backup support feature type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FeatureType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequestInternal)__featureSupportRequest).FeatureType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequestInternal)__featureSupportRequest).FeatureType = value ; } + + /// Backing field for property. + private string _vMSize; + + /// Size of the resource: VM size(A/D series etc) in case of IaasVM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VMSize { get => this._vMSize; set => this._vMSize = value; } + + /// Backing field for property. + private string _vMSku; + + /// SKUs (Premium/Managed etc) in case of IaasVM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VMSku { get => this._vMSku; set => this._vMSku = value; } + + /// Creates an new instance. + public AzureVMResourceFeatureSupportRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__featureSupportRequest), __featureSupportRequest); + await eventListener.AssertObjectIsValid(nameof(__featureSupportRequest), __featureSupportRequest); + } + } + /// AzureResource(IaaS VM) Specific feature support request + public partial interface IAzureVMResourceFeatureSupportRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest + { + /// Size of the resource: VM size(A/D series etc) in case of IaasVM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Size of the resource: VM size(A/D series etc) in case of IaasVM", + SerializedName = @"vmSize", + PossibleTypes = new [] { typeof(string) })] + string VMSize { get; set; } + /// SKUs (Premium/Managed etc) in case of IaasVM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SKUs (Premium/Managed etc) in case of IaasVM", + SerializedName = @"vmSku", + PossibleTypes = new [] { typeof(string) })] + string VMSku { get; set; } + + } + /// AzureResource(IaaS VM) Specific feature support request + internal partial interface IAzureVMResourceFeatureSupportRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequestInternal + { + /// Size of the resource: VM size(A/D series etc) in case of IaasVM + string VMSize { get; set; } + /// SKUs (Premium/Managed etc) in case of IaasVM + string VMSku { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportRequest.json.cs new file mode 100644 index 000000000000..c95f8ac863de --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportRequest.json.cs @@ -0,0 +1,113 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureResource(IaaS VM) Specific feature support request + public partial class AzureVMResourceFeatureSupportRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMResourceFeatureSupportRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __featureSupportRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FeatureSupportRequest(json); + {_vMSize = If( json?.PropertyT("vmSize"), out var __jsonVMSize) ? (string)__jsonVMSize : (string)VMSize;} + {_vMSku = If( json?.PropertyT("vmSku"), out var __jsonVMSku) ? (string)__jsonVMSku : (string)VMSku;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMResourceFeatureSupportRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __featureSupportRequest?.ToJson(container, serializationMode); + AddIf( null != (((object)this._vMSize)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._vMSize.ToString()) : null, "vmSize" ,container.Add ); + AddIf( null != (((object)this._vMSku)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._vMSku.ToString()) : null, "vmSku" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportResponse.cs new file mode 100644 index 000000000000..69bc47a5e835 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportResponse.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response for feature support requests for Azure IaasVm + public partial class AzureVMResourceFeatureSupportResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportResponseInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus? _supportStatus; + + /// Support status of feature + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus? SupportStatus { get => this._supportStatus; set => this._supportStatus = value; } + + /// Creates an new instance. + public AzureVMResourceFeatureSupportResponse() + { + + } + } + /// Response for feature support requests for Azure IaasVm + public partial interface IAzureVMResourceFeatureSupportResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Support status of feature + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Support status of feature", + SerializedName = @"supportStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus? SupportStatus { get; set; } + + } + /// Response for feature support requests for Azure IaasVm + internal partial interface IAzureVMResourceFeatureSupportResponseInternal + + { + /// Support status of feature + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus? SupportStatus { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportResponse.json.cs new file mode 100644 index 000000000000..805b43dfa253 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMResourceFeatureSupportResponse.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response for feature support requests for Azure IaasVm + public partial class AzureVMResourceFeatureSupportResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMResourceFeatureSupportResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_supportStatus = If( json?.PropertyT("supportStatus"), out var __jsonSupportStatus) ? (string)__jsonSupportStatus : (string)SupportStatus;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMResourceFeatureSupportResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMResourceFeatureSupportResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._supportStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._supportStatus.ToString()) : null, "supportStatus" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadItem.cs new file mode 100644 index 000000000000..7dca9c3f9cc1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadItem.cs @@ -0,0 +1,158 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item. + public partial class AzureVMWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem __workloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).FriendlyName = value ?? null; } + + /// Backing field for property. + private bool? _isAutoProtectable; + + /// Indicates if workload item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsAutoProtectable { get => this._isAutoProtectable; set => this._isAutoProtectable = value; } + + /// Backing field for property. + private string _parentName; + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ParentName { get => this._parentName; set => this._parentName = value; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Backing field for property. + private string _serverName; + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ServerName { get => this._serverName; set => this._serverName = value; } + + /// Backing field for property. + private int? _subWorkloadItemCount; + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? SubWorkloadItemCount { get => this._subWorkloadItemCount; set => this._subWorkloadItemCount = value; } + + /// Backing field for property. + private int? _subinquireditemcount; + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Subinquireditemcount { get => this._subinquireditemcount; set => this._subinquireditemcount = value; } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).Type = value ; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__workloadItem).WorkloadType = value ?? null; } + + /// Creates an new instance. + public AzureVMWorkloadItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__workloadItem), __workloadItem); + await eventListener.AssertObjectIsValid(nameof(__workloadItem), __workloadItem); + } + } + /// Azure VM workload-specific workload item. + public partial interface IAzureVMWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem + { + /// Indicates if workload item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if workload item is auto-protectable", + SerializedName = @"isAutoProtectable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoProtectable { get; set; } + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name for instance or AG", + SerializedName = @"parentName", + PossibleTypes = new [] { typeof(string) })] + string ParentName { get; set; } + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Host/Cluster Name for instance or AG", + SerializedName = @"serverName", + PossibleTypes = new [] { typeof(string) })] + string ServerName { get; set; } + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"For instance or AG, indicates number of DB's to be protected", + SerializedName = @"subWorkloadItemCount", + PossibleTypes = new [] { typeof(int) })] + int? SubWorkloadItemCount { get; set; } + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"For instance or AG, indicates number of DB's present", + SerializedName = @"subinquireditemcount", + PossibleTypes = new [] { typeof(int) })] + int? Subinquireditemcount { get; set; } + + } + /// Azure VM workload-specific workload item. + internal partial interface IAzureVMWorkloadItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal + { + /// Indicates if workload item is auto-protectable + bool? IsAutoProtectable { get; set; } + /// Name for instance or AG + string ParentName { get; set; } + /// Host/Cluster Name for instance or AG + string ServerName { get; set; } + /// For instance or AG, indicates number of DB's to be protected + int? SubWorkloadItemCount { get; set; } + /// For instance or AG, indicates number of DB's present + int? Subinquireditemcount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadItem.json.cs new file mode 100644 index 000000000000..728c7b5adf54 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadItem.json.cs @@ -0,0 +1,153 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item. + public partial class AzureVMWorkloadItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __workloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadItem(json); + {_parentName = If( json?.PropertyT("parentName"), out var __jsonParentName) ? (string)__jsonParentName : (string)ParentName;} + {_serverName = If( json?.PropertyT("serverName"), out var __jsonServerName) ? (string)__jsonServerName : (string)ServerName;} + {_isAutoProtectable = If( json?.PropertyT("isAutoProtectable"), out var __jsonIsAutoProtectable) ? (bool?)__jsonIsAutoProtectable : IsAutoProtectable;} + {_subinquireditemcount = If( json?.PropertyT("subinquireditemcount"), out var __jsonSubinquireditemcount) ? (int?)__jsonSubinquireditemcount : Subinquireditemcount;} + {_subWorkloadItemCount = If( json?.PropertyT("subWorkloadItemCount"), out var __jsonSubWorkloadItemCount) ? (int?)__jsonSubWorkloadItemCount : SubWorkloadItemCount;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("workloadItemType") ) + { + case "SAPAseDatabase": + { + return new AzureVMWorkloadSapAseDatabaseWorkloadItem(json); + } + case "SAPAseSystem": + { + return new AzureVMWorkloadSapAseSystemWorkloadItem(json); + } + case "SAPHanaDatabase": + { + return new AzureVMWorkloadSapHanaDatabaseWorkloadItem(json); + } + case "SAPHanaSystem": + { + return new AzureVMWorkloadSapHanaSystemWorkloadItem(json); + } + case "SQLDataBase": + { + return new AzureVMWorkloadSqlDatabaseWorkloadItem(json); + } + case "SQLInstance": + { + return new AzureVMWorkloadSqlInstanceWorkloadItem(json); + } + } + return new AzureVMWorkloadItem(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __workloadItem?.ToJson(container, serializationMode); + AddIf( null != (((object)this._parentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._parentName.ToString()) : null, "parentName" ,container.Add ); + AddIf( null != (((object)this._serverName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._serverName.ToString()) : null, "serverName" ,container.Add ); + AddIf( null != this._isAutoProtectable ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isAutoProtectable) : null, "isAutoProtectable" ,container.Add ); + AddIf( null != this._subinquireditemcount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._subinquireditemcount) : null, "subinquireditemcount" ,container.Add ); + AddIf( null != this._subWorkloadItemCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._subWorkloadItemCount) : null, "subWorkloadItemCount" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectableItem.cs new file mode 100644 index 000000000000..b703d6c324d3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectableItem.cs @@ -0,0 +1,273 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item. + public partial class AzureVMWorkloadProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem __workloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).FriendlyName = value ?? null; } + + /// Backing field for property. + private bool? _isAutoProtectable; + + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsAutoProtectable { get => this._isAutoProtectable; set => this._isAutoProtectable = value; } + + /// Backing field for property. + private bool? _isAutoProtected; + + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsAutoProtected { get => this._isAutoProtected; set => this._isAutoProtected = value; } + + /// Backing field for property. + private bool? _isProtectable; + + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsProtectable { get => this._isProtectable; set => this._isProtectable = value; } + + /// Internal Acessors for Prebackupvalidation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal.Prebackupvalidation { get => (this._prebackupvalidation = this._prebackupvalidation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PreBackupValidation()); set { {_prebackupvalidation = value;} } } + + /// Backing field for property. + private string _parentName; + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ParentName { get => this._parentName; set => this._parentName = value; } + + /// Backing field for property. + private string _parentUniqueName; + + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ParentUniqueName { get => this._parentUniqueName; set => this._parentUniqueName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation _prebackupvalidation; + + /// Pre-backup validation for protectable objects + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get => (this._prebackupvalidation = this._prebackupvalidation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PreBackupValidation()); set => this._prebackupvalidation = value; } + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PrebackupvalidationCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidationInternal)Prebackupvalidation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidationInternal)Prebackupvalidation).Code = value ?? null; } + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PrebackupvalidationMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidationInternal)Prebackupvalidation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidationInternal)Prebackupvalidation).Message = value ?? null; } + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidationInternal)Prebackupvalidation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidationInternal)Prebackupvalidation).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus)""); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Backing field for property. + private string _serverName; + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ServerName { get => this._serverName; set => this._serverName = value; } + + /// Backing field for property. + private int? _subinquireditemcount; + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Subinquireditemcount { get => this._subinquireditemcount; set => this._subinquireditemcount = value; } + + /// Backing field for property. + private int? _subprotectableitemcount; + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Subprotectableitemcount { get => this._subprotectableitemcount; set => this._subprotectableitemcount = value; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).WorkloadType = value ?? null; } + + /// Creates an new instance. + public AzureVMWorkloadProtectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__workloadProtectableItem), __workloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__workloadProtectableItem), __workloadProtectableItem); + } + } + /// Azure VM workload-specific protectable item. + public partial interface IAzureVMWorkloadProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem + { + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if protectable item is auto-protectable", + SerializedName = @"isAutoProtectable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoProtectable { get; set; } + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if protectable item is auto-protected", + SerializedName = @"isAutoProtected", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoProtected { get; set; } + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if item is protectable", + SerializedName = @"isProtectable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsProtectable { get; set; } + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name for instance or AG", + SerializedName = @"parentName", + PossibleTypes = new [] { typeof(string) })] + string ParentName { get; set; } + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parent Unique Name is added to provide the service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG.", + SerializedName = @"parentUniqueName", + PossibleTypes = new [] { typeof(string) })] + string ParentUniqueName { get; set; } + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error code of protectable item", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string PrebackupvalidationCode { get; set; } + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Message corresponding to the error code for the protectable item", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string PrebackupvalidationMessage { get; set; } + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of protectable item, i.e. InProgress,Succeeded,Failed", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get; set; } + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Host/Cluster Name for instance or AG", + SerializedName = @"serverName", + PossibleTypes = new [] { typeof(string) })] + string ServerName { get; set; } + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"For instance or AG, indicates number of DB's present", + SerializedName = @"subinquireditemcount", + PossibleTypes = new [] { typeof(int) })] + int? Subinquireditemcount { get; set; } + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"For instance or AG, indicates number of DB's to be protected", + SerializedName = @"subprotectableitemcount", + PossibleTypes = new [] { typeof(int) })] + int? Subprotectableitemcount { get; set; } + + } + /// Azure VM workload-specific protectable item. + internal partial interface IAzureVMWorkloadProtectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal + { + /// Indicates if protectable item is auto-protectable + bool? IsAutoProtectable { get; set; } + /// Indicates if protectable item is auto-protected + bool? IsAutoProtected { get; set; } + /// Indicates if item is protectable + bool? IsProtectable { get; set; } + /// Name for instance or AG + string ParentName { get; set; } + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + string ParentUniqueName { get; set; } + /// Pre-backup validation for protectable objects + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get; set; } + /// Error code of protectable item + string PrebackupvalidationCode { get; set; } + /// Message corresponding to the error code for the protectable item + string PrebackupvalidationMessage { get; set; } + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get; set; } + /// Host/Cluster Name for instance or AG + string ServerName { get; set; } + /// For instance or AG, indicates number of DB's present + int? Subinquireditemcount { get; set; } + /// For instance or AG, indicates number of DB's to be protected + int? Subprotectableitemcount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectableItem.json.cs new file mode 100644 index 000000000000..04d04d0126ef --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectableItem.json.cs @@ -0,0 +1,170 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item. + public partial class AzureVMWorkloadProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __workloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItem(json); + {_prebackupvalidation = If( json?.PropertyT("prebackupvalidation"), out var __jsonPrebackupvalidation) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PreBackupValidation.FromJson(__jsonPrebackupvalidation) : Prebackupvalidation;} + {_parentName = If( json?.PropertyT("parentName"), out var __jsonParentName) ? (string)__jsonParentName : (string)ParentName;} + {_parentUniqueName = If( json?.PropertyT("parentUniqueName"), out var __jsonParentUniqueName) ? (string)__jsonParentUniqueName : (string)ParentUniqueName;} + {_serverName = If( json?.PropertyT("serverName"), out var __jsonServerName) ? (string)__jsonServerName : (string)ServerName;} + {_isAutoProtectable = If( json?.PropertyT("isAutoProtectable"), out var __jsonIsAutoProtectable) ? (bool?)__jsonIsAutoProtectable : IsAutoProtectable;} + {_isAutoProtected = If( json?.PropertyT("isAutoProtected"), out var __jsonIsAutoProtected) ? (bool?)__jsonIsAutoProtected : IsAutoProtected;} + {_subinquireditemcount = If( json?.PropertyT("subinquireditemcount"), out var __jsonSubinquireditemcount) ? (int?)__jsonSubinquireditemcount : Subinquireditemcount;} + {_subprotectableitemcount = If( json?.PropertyT("subprotectableitemcount"), out var __jsonSubprotectableitemcount) ? (int?)__jsonSubprotectableitemcount : Subprotectableitemcount;} + {_isProtectable = If( json?.PropertyT("isProtectable"), out var __jsonIsProtectable) ? (bool?)__jsonIsProtectable : IsProtectable;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("protectableItemType") ) + { + case "SAPAseSystem": + { + return new AzureVMWorkloadSapAseSystemProtectableItem(json); + } + case "SAPHanaDatabase": + { + return new AzureVMWorkloadSapHanaDatabaseProtectableItem(json); + } + case "SAPHanaSystem": + { + return new AzureVMWorkloadSapHanaSystemProtectableItem(json); + } + case "SAPHanaDBInstance": + { + return new AzureVMWorkloadSapHanaDbinstance(json); + } + case "HanaHSRContainer": + { + return new AzureVMWorkloadSapHanaHsrprotectableItem(json); + } + case "SQLAvailabilityGroupContainer": + { + return new AzureVMWorkloadSqlAvailabilityGroupProtectableItem(json); + } + case "SQLDataBase": + { + return new AzureVMWorkloadSqlDatabaseProtectableItem(json); + } + case "SQLInstance": + { + return new AzureVMWorkloadSqlInstanceProtectableItem(json); + } + } + return new AzureVMWorkloadProtectableItem(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __workloadProtectableItem?.ToJson(container, serializationMode); + AddIf( null != this._prebackupvalidation ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._prebackupvalidation.ToJson(null,serializationMode) : null, "prebackupvalidation" ,container.Add ); + AddIf( null != (((object)this._parentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._parentName.ToString()) : null, "parentName" ,container.Add ); + AddIf( null != (((object)this._parentUniqueName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._parentUniqueName.ToString()) : null, "parentUniqueName" ,container.Add ); + AddIf( null != (((object)this._serverName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._serverName.ToString()) : null, "serverName" ,container.Add ); + AddIf( null != this._isAutoProtectable ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isAutoProtectable) : null, "isAutoProtectable" ,container.Add ); + AddIf( null != this._isAutoProtected ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isAutoProtected) : null, "isAutoProtected" ,container.Add ); + AddIf( null != this._subinquireditemcount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._subinquireditemcount) : null, "subinquireditemcount" ,container.Add ); + AddIf( null != this._subprotectableitemcount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._subprotectableitemcount) : null, "subprotectableitemcount" ,container.Add ); + AddIf( null != this._isProtectable ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isProtectable) : null, "isProtectable" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItem.cs new file mode 100644 index 000000000000..55a9e5e1f09a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItem.cs @@ -0,0 +1,529 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item. + public partial class AzureVMWorkloadProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo _extendedInfo; + + /// Additional information for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItemExtendedInfo()); set => this._extendedInfo = value; } + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).NewestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).NewestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPointInVault; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPointInVault = value ?? default(global::System.DateTime); } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoPolicyState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).PolicyState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).PolicyState = value ?? null; } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoRecoveryModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryModel = value ?? null; } + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount = value ?? default(int); } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the DB represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths _kpisHealth; + + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths KpisHealth { get => (this._kpisHealth = this._kpisHealth ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItemKpisHealths()); set => this._kpisHealth = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail _lastBackupErrorDetail; + + /// Error details in last backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail LastBackupErrorDetail { get => (this._lastBackupErrorDetail = this._lastBackupErrorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail()); set => this._lastBackupErrorDetail = value; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)LastBackupErrorDetail).Code; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)LastBackupErrorDetail).Message; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)LastBackupErrorDetail).Recommendation; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus? _lastBackupStatus; + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus? LastBackupStatus { get => this._lastBackupStatus; set => this._lastBackupStatus = value; } + + /// Backing field for property. + private global::System.DateTime? _lastBackupTime; + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastBackupTime { get => this._lastBackupTime; set => this._lastBackupTime = value; } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItemExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Internal Acessors for FriendlyName + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.FriendlyName { get => this._friendlyName; set { {_friendlyName = value;} } } + + /// Internal Acessors for LastBackupErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetail { get => (this._lastBackupErrorDetail = this._lastBackupErrorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail()); set { {_lastBackupErrorDetail = value;} } } + + /// Internal Acessors for LastBackupErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)LastBackupErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)LastBackupErrorDetail).Code = value; } + + /// Internal Acessors for LastBackupErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)LastBackupErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)LastBackupErrorDetail).Message = value; } + + /// Internal Acessors for LastBackupErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)LastBackupErrorDetail).Recommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)LastBackupErrorDetail).Recommendation = value; } + + /// Internal Acessors for ProtectionStatus + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.ProtectionStatus { get => this._protectionStatus; set { {_protectionStatus = value;} } } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] _nodesList; + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get => this._nodesList; set => this._nodesList = value; } + + /// Backing field for property. + private string _parentName; + + /// Parent name of the DB such as Instance or Availability Group. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ParentName { get => this._parentName; set => this._parentName = value; } + + /// Backing field for property. + private string _parentType; + + /// + /// Parent type of protected item, example: for a DB, standalone server or distributed + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ParentType { get => this._parentType; set => this._parentType = value; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName = value ?? null; } + + /// Backing field for property. + private string _protectedItemDataSourceId; + + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectedItemDataSourceId { get => this._protectedItemDataSourceId; set => this._protectedItemDataSourceId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus? _protectedItemHealthStatus; + + /// Health status of the backup item, evaluated based on last heartbeat received + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus? ProtectedItemHealthStatus { get => this._protectedItemHealthStatus; set => this._protectedItemHealthStatus = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? _protectionState; + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// Backing field for property. + private string _protectionStatus; + + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectionStatus { get => this._protectionStatus; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _serverName; + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ServerName { get => this._serverName; set => this._serverName = value; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; } + + /// Creates an new instance. + public AzureVMWorkloadProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectedItem), __protectedItem); + await eventListener.AssertObjectIsValid(nameof(__protectedItem), __protectedItem); + } + } + /// Azure VM workload-specific protected item. + public partial interface IAzureVMWorkloadProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem + { + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The latest backup copy available for this backup item in archive tier", + SerializedName = @"newestRecoveryPointInArchive", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item across all tiers.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item in archive tier", + SerializedName = @"oldestRecoveryPointInArchive", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item in vault tier", + SerializedName = @"oldestRecoveryPointInVault", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates consistency of policy object and policy applied to this backup item.", + SerializedName = @"policyState", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoPolicyState { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates consistency of policy object and policy applied to this backup item.", + SerializedName = @"recoveryModel", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoRecoveryModel { get; set; } + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of backup copies available for this backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoRecoveryPointCount { get; set; } + /// Friendly name of the DB represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Friendly name of the DB represented by this backup item.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; } + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health details of different KPIs", + SerializedName = @"kpisHealths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths KpisHealth { get; set; } + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string LastBackupErrorDetailCode { get; } + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Message related to the Code.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string LastBackupErrorDetailMessage { get; } + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of recommendation strings.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] LastBackupErrorDetailRecommendation { get; } + /// Last backup operation status. Possible values: Healthy, Unhealthy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last backup operation status. Possible values: Healthy, Unhealthy.", + SerializedName = @"lastBackupStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus? LastBackupStatus { get; set; } + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timestamp of the last backup operation on this backup item.", + SerializedName = @"lastBackupTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastBackupTime { get; set; } + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of the nodes in case of distributed container.", + SerializedName = @"nodesList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get; set; } + /// Parent name of the DB such as Instance or Availability Group. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parent name of the DB such as Instance or Availability Group.", + SerializedName = @"parentName", + PossibleTypes = new [] { typeof(string) })] + string ParentName { get; set; } + /// + /// Parent type of protected item, example: for a DB, standalone server or distributed + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parent type of protected item, example: for a DB, standalone server or distributed", + SerializedName = @"parentType", + PossibleTypes = new [] { typeof(string) })] + string ParentType { get; set; } + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Data ID of the protected item.", + SerializedName = @"protectedItemDataSourceId", + PossibleTypes = new [] { typeof(string) })] + string ProtectedItemDataSourceId { get; set; } + /// Health status of the backup item, evaluated based on last heartbeat received + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health status of the backup item, evaluated based on last heartbeat received", + SerializedName = @"protectedItemHealthStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus? ProtectedItemHealthStatus { get; set; } + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup state of this backup item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get; set; } + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Backup status of this backup item.", + SerializedName = @"protectionStatus", + PossibleTypes = new [] { typeof(string) })] + string ProtectionStatus { get; } + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Host/Cluster Name for instance or AG", + SerializedName = @"serverName", + PossibleTypes = new [] { typeof(string) })] + string ServerName { get; set; } + + } + /// Azure VM workload-specific protected item. + internal partial interface IAzureVMWorkloadProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal + { + /// Additional information for this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo ExtendedInfo { get; set; } + /// The latest backup copy available for this backup item in archive tier + global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item across all tiers. + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// The oldest backup copy available for this backup item in archive tier + global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item in vault tier + global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + string ExtendedInfoPolicyState { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + string ExtendedInfoRecoveryModel { get; set; } + /// Number of backup copies available for this backup item. + int? ExtendedInfoRecoveryPointCount { get; set; } + /// Friendly name of the DB represented by this backup item. + string FriendlyName { get; set; } + /// Health details of different KPIs + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths KpisHealth { get; set; } + /// Error details in last backup + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail LastBackupErrorDetail { get; set; } + /// Error code. + string LastBackupErrorDetailCode { get; set; } + /// Error Message related to the Code. + string LastBackupErrorDetailMessage { get; set; } + /// List of recommendation strings. + string[] LastBackupErrorDetailRecommendation { get; set; } + /// Last backup operation status. Possible values: Healthy, Unhealthy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus? LastBackupStatus { get; set; } + /// Timestamp of the last backup operation on this backup item. + global::System.DateTime? LastBackupTime { get; set; } + /// List of the nodes in case of distributed container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get; set; } + /// Parent name of the DB such as Instance or Availability Group. + string ParentName { get; set; } + /// + /// Parent type of protected item, example: for a DB, standalone server or distributed + /// + string ParentType { get; set; } + /// Data ID of the protected item. + string ProtectedItemDataSourceId { get; set; } + /// Health status of the backup item, evaluated based on last heartbeat received + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus? ProtectedItemHealthStatus { get; set; } + /// Backup state of this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get; set; } + /// Backup status of this backup item. + string ProtectionStatus { get; set; } + /// Host/Cluster Name for instance or AG + string ServerName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItem.json.cs new file mode 100644 index 000000000000..2465cef61a9e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItem.json.cs @@ -0,0 +1,177 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item. + public partial class AzureVMWorkloadProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(json); + {_lastBackupErrorDetail = If( json?.PropertyT("lastBackupErrorDetail"), out var __jsonLastBackupErrorDetail) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail.FromJson(__jsonLastBackupErrorDetail) : LastBackupErrorDetail;} + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItemExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_serverName = If( json?.PropertyT("serverName"), out var __jsonServerName) ? (string)__jsonServerName : (string)ServerName;} + {_parentName = If( json?.PropertyT("parentName"), out var __jsonParentName) ? (string)__jsonParentName : (string)ParentName;} + {_parentType = If( json?.PropertyT("parentType"), out var __jsonParentType) ? (string)__jsonParentType : (string)ParentType;} + {_protectionStatus = If( json?.PropertyT("protectionStatus"), out var __jsonProtectionStatus) ? (string)__jsonProtectionStatus : (string)ProtectionStatus;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + {_lastBackupStatus = If( json?.PropertyT("lastBackupStatus"), out var __jsonLastBackupStatus) ? (string)__jsonLastBackupStatus : (string)LastBackupStatus;} + {_lastBackupTime = If( json?.PropertyT("lastBackupTime"), out var __jsonLastBackupTime) ? global::System.DateTime.TryParse((string)__jsonLastBackupTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastBackupTimeValue) ? __jsonLastBackupTimeValue : LastBackupTime : LastBackupTime;} + {_protectedItemDataSourceId = If( json?.PropertyT("protectedItemDataSourceId"), out var __jsonProtectedItemDataSourceId) ? (string)__jsonProtectedItemDataSourceId : (string)ProtectedItemDataSourceId;} + {_protectedItemHealthStatus = If( json?.PropertyT("protectedItemHealthStatus"), out var __jsonProtectedItemHealthStatus) ? (string)__jsonProtectedItemHealthStatus : (string)ProtectedItemHealthStatus;} + {_kpisHealth = If( json?.PropertyT("kpisHealths"), out var __jsonKpisHealths) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItemKpisHealths.FromJson(__jsonKpisHealths) : KpisHealth;} + {_nodesList = If( json?.PropertyT("nodesList"), out var __jsonNodesList) ? If( __jsonNodesList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DistributedNodesInfo.FromJson(__u) )) ))() : null : NodesList;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("protectedItemType") ) + { + case "AzureVmWorkloadSAPAseDatabase": + { + return new AzureVMWorkloadSapAseDatabaseProtectedItem(json); + } + case "AzureVmWorkloadSAPHanaDatabase": + { + return new AzureVMWorkloadSapHanaDatabaseProtectedItem(json); + } + case "AzureVmWorkloadSAPHanaDBInstance": + { + return new AzureVMWorkloadSapHanaDbinstanceProtectedItem(json); + } + case "AzureVmWorkloadSQLDatabase": + { + return new AzureVMWorkloadSqlDatabaseProtectedItem(json); + } + } + return new AzureVMWorkloadProtectedItem(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectedItem?.ToJson(container, serializationMode); + AddIf( null != this._lastBackupErrorDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._lastBackupErrorDetail.ToJson(null,serializationMode) : null, "lastBackupErrorDetail" ,container.Add ); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + } + AddIf( null != (((object)this._serverName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._serverName.ToString()) : null, "serverName" ,container.Add ); + AddIf( null != (((object)this._parentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._parentName.ToString()) : null, "parentName" ,container.Add ); + AddIf( null != (((object)this._parentType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._parentType.ToString()) : null, "parentType" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._protectionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionStatus.ToString()) : null, "protectionStatus" ,container.Add ); + } + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + AddIf( null != (((object)this._lastBackupStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupStatus.ToString()) : null, "lastBackupStatus" ,container.Add ); + AddIf( null != this._lastBackupTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastBackupTime" ,container.Add ); + AddIf( null != (((object)this._protectedItemDataSourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectedItemDataSourceId.ToString()) : null, "protectedItemDataSourceId" ,container.Add ); + AddIf( null != (((object)this._protectedItemHealthStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectedItemHealthStatus.ToString()) : null, "protectedItemHealthStatus" ,container.Add ); + AddIf( null != this._kpisHealth ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._kpisHealth.ToJson(null,serializationMode) : null, "kpisHealths" ,container.Add ); + if (null != this._nodesList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._nodesList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("nodesList",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemExtendedInfo.cs new file mode 100644 index 000000000000..75c94bdf59d2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemExtendedInfo.cs @@ -0,0 +1,155 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on Azure Workload for SQL specific backup item. + public partial class AzureVMWorkloadProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfoInternal + { + + /// Backing field for property. + private global::System.DateTime? _newestRecoveryPointInArchive; + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? NewestRecoveryPointInArchive { get => this._newestRecoveryPointInArchive; set => this._newestRecoveryPointInArchive = value; } + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPoint; + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPoint { get => this._oldestRecoveryPoint; set => this._oldestRecoveryPoint = value; } + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPointInArchive; + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPointInArchive { get => this._oldestRecoveryPointInArchive; set => this._oldestRecoveryPointInArchive = value; } + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPointInVault; + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPointInVault { get => this._oldestRecoveryPointInVault; set => this._oldestRecoveryPointInVault = value; } + + /// Backing field for property. + private string _policyState; + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyState { get => this._policyState; set => this._policyState = value; } + + /// Backing field for property. + private string _recoveryModel; + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryModel { get => this._recoveryModel; set => this._recoveryModel = value; } + + /// Backing field for property. + private int? _recoveryPointCount; + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? RecoveryPointCount { get => this._recoveryPointCount; set => this._recoveryPointCount = value; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadProtectedItemExtendedInfo() + { + + } + } + /// Additional information on Azure Workload for SQL specific backup item. + public partial interface IAzureVMWorkloadProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The latest backup copy available for this backup item in archive tier", + SerializedName = @"newestRecoveryPointInArchive", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? NewestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item across all tiers.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item in archive tier", + SerializedName = @"oldestRecoveryPointInArchive", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available for this backup item in vault tier", + SerializedName = @"oldestRecoveryPointInVault", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPointInVault { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates consistency of policy object and policy applied to this backup item.", + SerializedName = @"policyState", + PossibleTypes = new [] { typeof(string) })] + string PolicyState { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates consistency of policy object and policy applied to this backup item.", + SerializedName = @"recoveryModel", + PossibleTypes = new [] { typeof(string) })] + string RecoveryModel { get; set; } + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of backup copies available for this backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? RecoveryPointCount { get; set; } + + } + /// Additional information on Azure Workload for SQL specific backup item. + internal partial interface IAzureVMWorkloadProtectedItemExtendedInfoInternal + + { + /// The latest backup copy available for this backup item in archive tier + global::System.DateTime? NewestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item across all tiers. + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// The oldest backup copy available for this backup item in archive tier + global::System.DateTime? OldestRecoveryPointInArchive { get; set; } + /// The oldest backup copy available for this backup item in vault tier + global::System.DateTime? OldestRecoveryPointInVault { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + string PolicyState { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + string RecoveryModel { get; set; } + /// Number of backup copies available for this backup item. + int? RecoveryPointCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemExtendedInfo.json.cs new file mode 100644 index 000000000000..b5548c8785e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemExtendedInfo.json.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on Azure Workload for SQL specific backup item. + public partial class AzureVMWorkloadProtectedItemExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadProtectedItemExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_oldestRecoveryPoint = If( json?.PropertyT("oldestRecoveryPoint"), out var __jsonOldestRecoveryPoint) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPoint, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointValue) ? __jsonOldestRecoveryPointValue : OldestRecoveryPoint : OldestRecoveryPoint;} + {_oldestRecoveryPointInVault = If( json?.PropertyT("oldestRecoveryPointInVault"), out var __jsonOldestRecoveryPointInVault) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPointInVault, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointInVaultValue) ? __jsonOldestRecoveryPointInVaultValue : OldestRecoveryPointInVault : OldestRecoveryPointInVault;} + {_oldestRecoveryPointInArchive = If( json?.PropertyT("oldestRecoveryPointInArchive"), out var __jsonOldestRecoveryPointInArchive) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPointInArchive, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointInArchiveValue) ? __jsonOldestRecoveryPointInArchiveValue : OldestRecoveryPointInArchive : OldestRecoveryPointInArchive;} + {_newestRecoveryPointInArchive = If( json?.PropertyT("newestRecoveryPointInArchive"), out var __jsonNewestRecoveryPointInArchive) ? global::System.DateTime.TryParse((string)__jsonNewestRecoveryPointInArchive, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonNewestRecoveryPointInArchiveValue) ? __jsonNewestRecoveryPointInArchiveValue : NewestRecoveryPointInArchive : NewestRecoveryPointInArchive;} + {_recoveryPointCount = If( json?.PropertyT("recoveryPointCount"), out var __jsonRecoveryPointCount) ? (int?)__jsonRecoveryPointCount : RecoveryPointCount;} + {_policyState = If( json?.PropertyT("policyState"), out var __jsonPolicyState) ? (string)__jsonPolicyState : (string)PolicyState;} + {_recoveryModel = If( json?.PropertyT("recoveryModel"), out var __jsonRecoveryModel) ? (string)__jsonRecoveryModel : (string)RecoveryModel;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadProtectedItemExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._oldestRecoveryPoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPoint?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPoint" ,container.Add ); + AddIf( null != this._oldestRecoveryPointInVault ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPointInVault?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPointInVault" ,container.Add ); + AddIf( null != this._oldestRecoveryPointInArchive ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPointInArchive?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPointInArchive" ,container.Add ); + AddIf( null != this._newestRecoveryPointInArchive ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._newestRecoveryPointInArchive?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "newestRecoveryPointInArchive" ,container.Add ); + AddIf( null != this._recoveryPointCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._recoveryPointCount) : null, "recoveryPointCount" ,container.Add ); + AddIf( null != (((object)this._policyState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyState.ToString()) : null, "policyState" ,container.Add ); + AddIf( null != (((object)this._recoveryModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryModel.ToString()) : null, "recoveryModel" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemKpisHealths.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemKpisHealths.cs new file mode 100644 index 000000000000..c3a1535d8340 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemKpisHealths.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Health details of different KPIs + public partial class AzureVMWorkloadProtectedItemKpisHealths : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealthsInternal + { + + /// Creates an new instance. + public AzureVMWorkloadProtectedItemKpisHealths() + { + + } + } + /// Health details of different KPIs + public partial interface IAzureVMWorkloadProtectedItemKpisHealths : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Health details of different KPIs + internal partial interface IAzureVMWorkloadProtectedItemKpisHealthsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemKpisHealths.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemKpisHealths.dictionary.cs new file mode 100644 index 000000000000..762ca0f537b7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemKpisHealths.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureVMWorkloadProtectedItemKpisHealths : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItemKpisHealths source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemKpisHealths.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemKpisHealths.json.cs new file mode 100644 index 000000000000..2187bc523f9b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectedItemKpisHealths.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Health details of different KPIs + public partial class AzureVMWorkloadProtectedItemKpisHealths + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureVMWorkloadProtectedItemKpisHealths(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.KpiResourceHealthDetails.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadProtectedItemKpisHealths(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectionPolicy.cs new file mode 100644 index 000000000000..8b75be8dd078 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectionPolicy.cs @@ -0,0 +1,188 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM (Mercury) workload-specific backup policy. + public partial class AzureVMWorkloadProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectionPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType = value ; } + + /// Backing field for property. + private bool? _makePolicyConsistent; + + /// Fix the policy inconsistency + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? MakePolicyConsistent { get => this._makePolicyConsistent; set => this._makePolicyConsistent = value; } + + /// Internal Acessors for Setting + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettings Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectionPolicyInternal.Setting { get => (this._setting = this._setting ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Settings()); set { {_setting = value;} } } + + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount = value ?? default(int); } + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettings _setting; + + /// Common settings for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettings Setting { get => (this._setting = this._setting ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Settings()); set => this._setting = value; } + + /// + /// Workload compression flag. This has been added so that 'isSqlCompression' + /// will be deprecated once clients upgrade to consider this flag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? SettingIsCompression { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettingsInternal)Setting).IsCompression; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettingsInternal)Setting).IsCompression = value ?? default(bool); } + + /// SQL compression flag + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? SettingIssqlcompression { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettingsInternal)Setting).Issqlcompression; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettingsInternal)Setting).Issqlcompression = value ?? default(bool); } + + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SettingTimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettingsInternal)Setting).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettingsInternal)Setting).TimeZone = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy[] _subProtectionPolicy; + + /// List of sub-protection policies which includes schedule and retention + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy[] SubProtectionPolicy { get => this._subProtectionPolicy; set => this._subProtectionPolicy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? _workLoadType; + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkLoadType { get => this._workLoadType; set => this._workLoadType = value; } + + /// Creates an new instance. + public AzureVMWorkloadProtectionPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionPolicy), __protectionPolicy); + await eventListener.AssertObjectIsValid(nameof(__protectionPolicy), __protectionPolicy); + } + } + /// Azure VM (Mercury) workload-specific backup policy. + public partial interface IAzureVMWorkloadProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy + { + /// Fix the policy inconsistency + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fix the policy inconsistency", + SerializedName = @"makePolicyConsistent", + PossibleTypes = new [] { typeof(bool) })] + bool? MakePolicyConsistent { get; set; } + /// + /// Workload compression flag. This has been added so that 'isSqlCompression' + /// will be deprecated once clients upgrade to consider this flag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload compression flag. This has been added so that 'isSqlCompression' + will be deprecated once clients upgrade to consider this flag.", + SerializedName = @"isCompression", + PossibleTypes = new [] { typeof(bool) })] + bool? SettingIsCompression { get; set; } + /// SQL compression flag + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SQL compression flag", + SerializedName = @"issqlcompression", + PossibleTypes = new [] { typeof(bool) })] + bool? SettingIssqlcompression { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"TimeZone optional input as string. For example: TimeZone = ""Pacific Standard Time"".", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string SettingTimeZone { get; set; } + /// List of sub-protection policies which includes schedule and retention + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of sub-protection policies which includes schedule and retention", + SerializedName = @"subProtectionPolicy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy[] SubProtectionPolicy { get; set; } + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of workload for the backup management", + SerializedName = @"workLoadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkLoadType { get; set; } + + } + /// Azure VM (Mercury) workload-specific backup policy. + internal partial interface IAzureVMWorkloadProtectionPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal + { + /// Fix the policy inconsistency + bool? MakePolicyConsistent { get; set; } + /// Common settings for the backup management + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettings Setting { get; set; } + /// + /// Workload compression flag. This has been added so that 'isSqlCompression' + /// will be deprecated once clients upgrade to consider this flag. + /// + bool? SettingIsCompression { get; set; } + /// SQL compression flag + bool? SettingIssqlcompression { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + string SettingTimeZone { get; set; } + /// List of sub-protection policies which includes schedule and retention + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy[] SubProtectionPolicy { get; set; } + /// Type of workload for the backup management + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkLoadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectionPolicy.json.cs new file mode 100644 index 000000000000..5c0582d37de0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadProtectionPolicy.json.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM (Mercury) workload-specific backup policy. + public partial class AzureVMWorkloadProtectionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadProtectionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(json); + {_setting = If( json?.PropertyT("settings"), out var __jsonSettings) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Settings.FromJson(__jsonSettings) : Setting;} + {_workLoadType = If( json?.PropertyT("workLoadType"), out var __jsonWorkLoadType) ? (string)__jsonWorkLoadType : (string)WorkLoadType;} + {_subProtectionPolicy = If( json?.PropertyT("subProtectionPolicy"), out var __jsonSubProtectionPolicy) ? If( __jsonSubProtectionPolicy as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SubProtectionPolicy.FromJson(__u) )) ))() : null : SubProtectionPolicy;} + {_makePolicyConsistent = If( json?.PropertyT("makePolicyConsistent"), out var __jsonMakePolicyConsistent) ? (bool?)__jsonMakePolicyConsistent : MakePolicyConsistent;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadProtectionPolicy(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionPolicy?.ToJson(container, serializationMode); + AddIf( null != this._setting ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._setting.ToJson(null,serializationMode) : null, "settings" ,container.Add ); + AddIf( null != (((object)this._workLoadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workLoadType.ToString()) : null, "workLoadType" ,container.Add ); + if (null != this._subProtectionPolicy) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._subProtectionPolicy ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("subProtectionPolicy",__w); + } + AddIf( null != this._makePolicyConsistent ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._makePolicyConsistent) : null, "makePolicyConsistent" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseProtectedItem.cs new file mode 100644 index 000000000000..52f5415c7816 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseProtectedItem.cs @@ -0,0 +1,255 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item representing SAP ASE Database. + public partial class AzureVMWorkloadSapAseDatabaseProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem __azureVMWorkloadProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Additional information for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfo = value ?? null /* model class */; } + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoNewestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoNewestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInVault; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInVault = value ?? default(global::System.DateTime); } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoPolicyState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoPolicyState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoPolicyState = value ?? null; } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoRecoveryModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryModel = value ?? null; } + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryPointCount = value ?? default(int); } + + /// Friendly name of the DB represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths KpisHealth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).KpisHealth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).KpisHealth = value ?? null /* model class */; } + + /// Error details in last backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail LastBackupErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetail = value ?? null /* model class */; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation; } + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus? LastBackupStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus)""); } + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastBackupTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupTime = value ?? default(global::System.DateTime); } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for FriendlyName + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName = value; } + + /// Internal Acessors for LastBackupErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode = value; } + + /// Internal Acessors for LastBackupErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage = value; } + + /// Internal Acessors for LastBackupErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation = value; } + + /// Internal Acessors for ProtectionStatus + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus = value; } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType = value; } + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).NodesList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).NodesList = value ?? null /* arrayOf */; } + + /// Parent name of the DB such as Instance or Availability Group. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentName = value ?? null; } + + /// + /// Parent type of protected item, example: for a DB, standalone server or distributed + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentType = value ?? null; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyName = value ?? null; } + + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectedItemDataSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemDataSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemDataSourceId = value ?? null; } + + /// Health status of the backup item, evaluated based on last heartbeat received + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus? ProtectedItemHealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemHealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemHealthStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus)""); } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState)""); } + + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ServerName = value ?? null; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapAseDatabaseProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectedItem), __azureVMWorkloadProtectedItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectedItem), __azureVMWorkloadProtectedItem); + } + } + /// Azure VM workload-specific protected item representing SAP ASE Database. + public partial interface IAzureVMWorkloadSapAseDatabaseProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem + { + + } + /// Azure VM workload-specific protected item representing SAP ASE Database. + internal partial interface IAzureVMWorkloadSapAseDatabaseProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseProtectedItem.json.cs new file mode 100644 index 000000000000..1ec7382f038b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseProtectedItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item representing SAP ASE Database. + public partial class AzureVMWorkloadSapAseDatabaseProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapAseDatabaseProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseProtectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapAseDatabaseProtectedItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectedItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseWorkloadItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseWorkloadItem.cs new file mode 100644 index 000000000000..d57fcbbf5759 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseWorkloadItem.cs @@ -0,0 +1,95 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SAP ASE Database. + public partial class AzureVMWorkloadSapAseDatabaseWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseWorkloadItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseWorkloadItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName = value ?? null; } + + /// Indicates if workload item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName = value ?? null; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SubWorkloadItemCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount = value ?? default(int); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type = value ; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapAseDatabaseWorkloadItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + } + } + /// Azure VM workload-specific workload item representing SAP ASE Database. + public partial interface IAzureVMWorkloadSapAseDatabaseWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem + { + + } + /// Azure VM workload-specific workload item representing SAP ASE Database. + internal partial interface IAzureVMWorkloadSapAseDatabaseWorkloadItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseWorkloadItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseWorkloadItem.json.cs new file mode 100644 index 000000000000..397364f899f8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseDatabaseWorkloadItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SAP ASE Database. + public partial class AzureVMWorkloadSapAseDatabaseWorkloadItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapAseDatabaseWorkloadItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseWorkloadItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseWorkloadItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseDatabaseWorkloadItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapAseDatabaseWorkloadItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemProtectableItem.cs new file mode 100644 index 000000000000..8cd86ea46736 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemProtectableItem.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SAP ASE System. + public partial class AzureVMWorkloadSapAseSystemProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemProtectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName = value ?? null; } + + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable = value ?? default(bool); } + + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected = value ?? default(bool); } + + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName = value ?? null; } + + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName = value ?? null; } + + /// Pre-backup validation for protectable objects + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation = value ?? null /* model class */; } + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode = value ?? null; } + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage = value ?? null; } + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus)""); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subprotectableitemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount = value ?? default(int); } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapAseSystemProtectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + } + } + /// Azure VM workload-specific protectable item representing SAP ASE System. + public partial interface IAzureVMWorkloadSapAseSystemProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem + { + + } + /// Azure VM workload-specific protectable item representing SAP ASE System. + internal partial interface IAzureVMWorkloadSapAseSystemProtectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemProtectableItem.json.cs new file mode 100644 index 000000000000..b4b6c6416e5a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemProtectableItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SAP ASE System. + public partial class AzureVMWorkloadSapAseSystemProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapAseSystemProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemProtectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapAseSystemProtectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectableItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemWorkloadItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemWorkloadItem.cs new file mode 100644 index 000000000000..2cefad6908db --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemWorkloadItem.cs @@ -0,0 +1,93 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SAP ASE System. + public partial class AzureVMWorkloadSapAseSystemWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemWorkloadItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemWorkloadItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName = value ?? null; } + + /// Indicates if workload item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName = value ?? null; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SubWorkloadItemCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount = value ?? default(int); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type = value ; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType = value ?? null; } + + /// Creates an new instance. + public AzureVMWorkloadSapAseSystemWorkloadItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + } + } + /// Azure VM workload-specific workload item representing SAP ASE System. + public partial interface IAzureVMWorkloadSapAseSystemWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem + { + + } + /// Azure VM workload-specific workload item representing SAP ASE System. + internal partial interface IAzureVMWorkloadSapAseSystemWorkloadItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemWorkloadItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemWorkloadItem.json.cs new file mode 100644 index 000000000000..107348fb40ab --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapAseSystemWorkloadItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SAP ASE System. + public partial class AzureVMWorkloadSapAseSystemWorkloadItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapAseSystemWorkloadItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemWorkloadItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemWorkloadItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapAseSystemWorkloadItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapAseSystemWorkloadItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectableItem.cs new file mode 100644 index 000000000000..bee710ffc100 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectableItem.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SAP HANA Database. + public partial class AzureVMWorkloadSapHanaDatabaseProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName = value ?? null; } + + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable = value ?? default(bool); } + + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected = value ?? default(bool); } + + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName = value ?? null; } + + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName = value ?? null; } + + /// Pre-backup validation for protectable objects + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation = value ?? null /* model class */; } + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode = value ?? null; } + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage = value ?? null; } + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus)""); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subprotectableitemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount = value ?? default(int); } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapHanaDatabaseProtectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + } + } + /// Azure VM workload-specific protectable item representing SAP HANA Database. + public partial interface IAzureVMWorkloadSapHanaDatabaseProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem + { + + } + /// Azure VM workload-specific protectable item representing SAP HANA Database. + internal partial interface IAzureVMWorkloadSapHanaDatabaseProtectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectableItem.json.cs new file mode 100644 index 000000000000..728c7f66f321 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectableItem.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SAP HANA Database. + public partial class AzureVMWorkloadSapHanaDatabaseProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapHanaDatabaseProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapHanaDatabaseProtectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectableItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectedItem.cs new file mode 100644 index 000000000000..77faf3c8394e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectedItem.cs @@ -0,0 +1,255 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item representing SAP HANA Database. + public partial class AzureVMWorkloadSapHanaDatabaseProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem __azureVMWorkloadProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Additional information for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfo = value ?? null /* model class */; } + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoNewestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoNewestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInVault; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInVault = value ?? default(global::System.DateTime); } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoPolicyState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoPolicyState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoPolicyState = value ?? null; } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoRecoveryModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryModel = value ?? null; } + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryPointCount = value ?? default(int); } + + /// Friendly name of the DB represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths KpisHealth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).KpisHealth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).KpisHealth = value ?? null /* model class */; } + + /// Error details in last backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail LastBackupErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetail = value ?? null /* model class */; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation; } + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus? LastBackupStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus)""); } + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastBackupTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupTime = value ?? default(global::System.DateTime); } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for FriendlyName + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName = value; } + + /// Internal Acessors for LastBackupErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode = value; } + + /// Internal Acessors for LastBackupErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage = value; } + + /// Internal Acessors for LastBackupErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation = value; } + + /// Internal Acessors for ProtectionStatus + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus = value; } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType = value; } + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).NodesList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).NodesList = value ?? null /* arrayOf */; } + + /// Parent name of the DB such as Instance or Availability Group. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentName = value ?? null; } + + /// + /// Parent type of protected item, example: for a DB, standalone server or distributed + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentType = value ?? null; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyName = value ?? null; } + + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectedItemDataSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemDataSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemDataSourceId = value ?? null; } + + /// Health status of the backup item, evaluated based on last heartbeat received + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus? ProtectedItemHealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemHealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemHealthStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus)""); } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState)""); } + + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ServerName = value ?? null; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapHanaDatabaseProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectedItem), __azureVMWorkloadProtectedItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectedItem), __azureVMWorkloadProtectedItem); + } + } + /// Azure VM workload-specific protected item representing SAP HANA Database. + public partial interface IAzureVMWorkloadSapHanaDatabaseProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem + { + + } + /// Azure VM workload-specific protected item representing SAP HANA Database. + internal partial interface IAzureVMWorkloadSapHanaDatabaseProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectedItem.json.cs new file mode 100644 index 000000000000..1c27075a35ee --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseProtectedItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item representing SAP HANA Database. + public partial class AzureVMWorkloadSapHanaDatabaseProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapHanaDatabaseProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapHanaDatabaseProtectedItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectedItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseWorkloadItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseWorkloadItem.cs new file mode 100644 index 000000000000..834bb900ebe6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseWorkloadItem.cs @@ -0,0 +1,95 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SAP HANA Database. + public partial class AzureVMWorkloadSapHanaDatabaseWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseWorkloadItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseWorkloadItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName = value ?? null; } + + /// Indicates if workload item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName = value ?? null; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SubWorkloadItemCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount = value ?? default(int); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type = value ; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapHanaDatabaseWorkloadItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + } + } + /// Azure VM workload-specific workload item representing SAP HANA Database. + public partial interface IAzureVMWorkloadSapHanaDatabaseWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem + { + + } + /// Azure VM workload-specific workload item representing SAP HANA Database. + internal partial interface IAzureVMWorkloadSapHanaDatabaseWorkloadItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseWorkloadItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseWorkloadItem.json.cs new file mode 100644 index 000000000000..8b95e7affae7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDatabaseWorkloadItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SAP HANA Database. + public partial class AzureVMWorkloadSapHanaDatabaseWorkloadItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapHanaDatabaseWorkloadItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseWorkloadItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseWorkloadItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDatabaseWorkloadItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapHanaDatabaseWorkloadItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstance.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstance.cs new file mode 100644 index 000000000000..aa5117464116 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstance.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SAP HANA Dbinstance. + public partial class AzureVMWorkloadSapHanaDbinstance : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstance, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstanceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName = value ?? null; } + + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable = value ?? default(bool); } + + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected = value ?? default(bool); } + + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName = value ?? null; } + + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName = value ?? null; } + + /// Pre-backup validation for protectable objects + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation = value ?? null /* model class */; } + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode = value ?? null; } + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage = value ?? null; } + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus)""); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subprotectableitemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount = value ?? default(int); } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType = value ?? null; } + + /// Creates an new instance. + public AzureVMWorkloadSapHanaDbinstance() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + } + } + /// Azure VM workload-specific protectable item representing SAP HANA Dbinstance. + public partial interface IAzureVMWorkloadSapHanaDbinstance : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem + { + + } + /// Azure VM workload-specific protectable item representing SAP HANA Dbinstance. + internal partial interface IAzureVMWorkloadSapHanaDbinstanceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstance.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstance.json.cs new file mode 100644 index 000000000000..ac5cbb060619 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstance.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SAP HANA Dbinstance. + public partial class AzureVMWorkloadSapHanaDbinstance + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapHanaDbinstance(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstance. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstance. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstance FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapHanaDbinstance(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectableItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstanceProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstanceProtectedItem.cs new file mode 100644 index 000000000000..4bf6cb775e79 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstanceProtectedItem.cs @@ -0,0 +1,255 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item representing SAP HANA DBInstance. + public partial class AzureVMWorkloadSapHanaDbinstanceProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstanceProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstanceProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem __azureVMWorkloadProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Additional information for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfo = value ?? null /* model class */; } + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoNewestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoNewestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInVault; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInVault = value ?? default(global::System.DateTime); } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoPolicyState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoPolicyState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoPolicyState = value ?? null; } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoRecoveryModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryModel = value ?? null; } + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryPointCount = value ?? default(int); } + + /// Friendly name of the DB represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths KpisHealth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).KpisHealth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).KpisHealth = value ?? null /* model class */; } + + /// Error details in last backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail LastBackupErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetail = value ?? null /* model class */; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation; } + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus? LastBackupStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus)""); } + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastBackupTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupTime = value ?? default(global::System.DateTime); } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for FriendlyName + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName = value; } + + /// Internal Acessors for LastBackupErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode = value; } + + /// Internal Acessors for LastBackupErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage = value; } + + /// Internal Acessors for LastBackupErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation = value; } + + /// Internal Acessors for ProtectionStatus + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus = value; } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType = value; } + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).NodesList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).NodesList = value ?? null /* arrayOf */; } + + /// Parent name of the DB such as Instance or Availability Group. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentName = value ?? null; } + + /// + /// Parent type of protected item, example: for a DB, standalone server or distributed + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentType = value ?? null; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyName = value ?? null; } + + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectedItemDataSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemDataSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemDataSourceId = value ?? null; } + + /// Health status of the backup item, evaluated based on last heartbeat received + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus? ProtectedItemHealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemHealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemHealthStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus)""); } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState)""); } + + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ServerName = value ?? null; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapHanaDbinstanceProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectedItem), __azureVMWorkloadProtectedItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectedItem), __azureVMWorkloadProtectedItem); + } + } + /// Azure VM workload-specific protected item representing SAP HANA DBInstance. + public partial interface IAzureVMWorkloadSapHanaDbinstanceProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem + { + + } + /// Azure VM workload-specific protected item representing SAP HANA DBInstance. + internal partial interface IAzureVMWorkloadSapHanaDbinstanceProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstanceProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstanceProtectedItem.json.cs new file mode 100644 index 000000000000..2048b28df37c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaDbinstanceProtectedItem.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item representing SAP HANA DBInstance. + public partial class AzureVMWorkloadSapHanaDbinstanceProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapHanaDbinstanceProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstanceProtectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstanceProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaDbinstanceProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapHanaDbinstanceProtectedItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectedItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaHsrprotectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaHsrprotectableItem.cs new file mode 100644 index 000000000000..8f1aa8a6e0a9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaHsrprotectableItem.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing HANA HSR. + public partial class AzureVMWorkloadSapHanaHsrprotectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaHsrprotectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaHsrprotectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName = value ?? null; } + + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable = value ?? default(bool); } + + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected = value ?? default(bool); } + + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName = value ?? null; } + + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName = value ?? null; } + + /// Pre-backup validation for protectable objects + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation = value ?? null /* model class */; } + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode = value ?? null; } + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage = value ?? null; } + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus)""); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subprotectableitemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount = value ?? default(int); } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapHanaHsrprotectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + } + } + /// Azure VM workload-specific protectable item representing HANA HSR. + public partial interface IAzureVMWorkloadSapHanaHsrprotectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem + { + + } + /// Azure VM workload-specific protectable item representing HANA HSR. + internal partial interface IAzureVMWorkloadSapHanaHsrprotectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaHsrprotectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaHsrprotectableItem.json.cs new file mode 100644 index 000000000000..384aa81a6e96 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaHsrprotectableItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing HANA HSR. + public partial class AzureVMWorkloadSapHanaHsrprotectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapHanaHsrprotectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaHsrprotectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaHsrprotectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaHsrprotectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapHanaHsrprotectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectableItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemProtectableItem.cs new file mode 100644 index 000000000000..e6261b66066b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemProtectableItem.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SAP HANA System. + public partial class AzureVMWorkloadSapHanaSystemProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemProtectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName = value ?? null; } + + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable = value ?? default(bool); } + + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected = value ?? default(bool); } + + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName = value ?? null; } + + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName = value ?? null; } + + /// Pre-backup validation for protectable objects + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation = value ?? null /* model class */; } + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode = value ?? null; } + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage = value ?? null; } + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus)""); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subprotectableitemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount = value ?? default(int); } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapHanaSystemProtectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + } + } + /// Azure VM workload-specific protectable item representing SAP HANA System. + public partial interface IAzureVMWorkloadSapHanaSystemProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem + { + + } + /// Azure VM workload-specific protectable item representing SAP HANA System. + internal partial interface IAzureVMWorkloadSapHanaSystemProtectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemProtectableItem.json.cs new file mode 100644 index 000000000000..439ecac5d3e5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemProtectableItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SAP HANA System. + public partial class AzureVMWorkloadSapHanaSystemProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapHanaSystemProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemProtectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapHanaSystemProtectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectableItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemWorkloadItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemWorkloadItem.cs new file mode 100644 index 000000000000..bb55399896e7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemWorkloadItem.cs @@ -0,0 +1,95 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SAP HANA System. + public partial class AzureVMWorkloadSapHanaSystemWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemWorkloadItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemWorkloadItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName = value ?? null; } + + /// Indicates if workload item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName = value ?? null; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SubWorkloadItemCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount = value ?? default(int); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type = value ; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSapHanaSystemWorkloadItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + } + } + /// Azure VM workload-specific workload item representing SAP HANA System. + public partial interface IAzureVMWorkloadSapHanaSystemWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem + { + + } + /// Azure VM workload-specific workload item representing SAP HANA System. + internal partial interface IAzureVMWorkloadSapHanaSystemWorkloadItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemWorkloadItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemWorkloadItem.json.cs new file mode 100644 index 000000000000..486c72a2eea8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSapHanaSystemWorkloadItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SAP HANA System. + public partial class AzureVMWorkloadSapHanaSystemWorkloadItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSapHanaSystemWorkloadItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemWorkloadItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemWorkloadItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSapHanaSystemWorkloadItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSapHanaSystemWorkloadItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlAvailabilityGroupProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlAvailabilityGroupProtectableItem.cs new file mode 100644 index 000000000000..d293e8adc2e7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlAvailabilityGroupProtectableItem.cs @@ -0,0 +1,145 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Azure VM workload-specific protectable item representing SQL Availability Group. + /// + public partial class AzureVMWorkloadSqlAvailabilityGroupProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlAvailabilityGroupProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlAvailabilityGroupProtectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName = value ?? null; } + + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable = value ?? default(bool); } + + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected = value ?? default(bool); } + + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] _nodesList; + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get => this._nodesList; set => this._nodesList = value; } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName = value ?? null; } + + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName = value ?? null; } + + /// Pre-backup validation for protectable objects + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation = value ?? null /* model class */; } + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode = value ?? null; } + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage = value ?? null; } + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus)""); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subprotectableitemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount = value ?? default(int); } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSqlAvailabilityGroupProtectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + } + } + /// Azure VM workload-specific protectable item representing SQL Availability Group. + public partial interface IAzureVMWorkloadSqlAvailabilityGroupProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem + { + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of the nodes in case of distributed container.", + SerializedName = @"nodesList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get; set; } + + } + /// Azure VM workload-specific protectable item representing SQL Availability Group. + internal partial interface IAzureVMWorkloadSqlAvailabilityGroupProtectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal + { + /// List of the nodes in case of distributed container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlAvailabilityGroupProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlAvailabilityGroupProtectableItem.json.cs new file mode 100644 index 000000000000..576d18981d0c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlAvailabilityGroupProtectableItem.json.cs @@ -0,0 +1,123 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Azure VM workload-specific protectable item representing SQL Availability Group. + /// + public partial class AzureVMWorkloadSqlAvailabilityGroupProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSqlAvailabilityGroupProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(json); + {_nodesList = If( json?.PropertyT("nodesList"), out var __jsonNodesList) ? If( __jsonNodesList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DistributedNodesInfo.FromJson(__u) )) ))() : null : NodesList;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlAvailabilityGroupProtectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlAvailabilityGroupProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlAvailabilityGroupProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSqlAvailabilityGroupProtectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectableItem?.ToJson(container, serializationMode); + if (null != this._nodesList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._nodesList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("nodesList",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectableItem.cs new file mode 100644 index 000000000000..98670ef5a8a1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectableItem.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SQL Database. + public partial class AzureVMWorkloadSqlDatabaseProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName = value ?? null; } + + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable = value ?? default(bool); } + + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected = value ?? default(bool); } + + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName = value ?? null; } + + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName = value ?? null; } + + /// Pre-backup validation for protectable objects + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation = value ?? null /* model class */; } + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode = value ?? null; } + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage = value ?? null; } + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus)""); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subprotectableitemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount = value ?? default(int); } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSqlDatabaseProtectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + } + } + /// Azure VM workload-specific protectable item representing SQL Database. + public partial interface IAzureVMWorkloadSqlDatabaseProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem + { + + } + /// Azure VM workload-specific protectable item representing SQL Database. + internal partial interface IAzureVMWorkloadSqlDatabaseProtectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectableItem.json.cs new file mode 100644 index 000000000000..199a4f29f159 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectableItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SQL Database. + public partial class AzureVMWorkloadSqlDatabaseProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSqlDatabaseProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSqlDatabaseProtectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectableItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectedItem.cs new file mode 100644 index 000000000000..c86ec70fb38c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectedItem.cs @@ -0,0 +1,253 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item representing SQL Database. + public partial class AzureVMWorkloadSqlDatabaseProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem __azureVMWorkloadProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Additional information for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfo = value ?? null /* model class */; } + + /// The latest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoNewestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoNewestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoNewestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item across all tiers. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in archive tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInArchive { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInArchive; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInArchive = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available for this backup item in vault tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPointInVault { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInVault; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoOldestRecoveryPointInVault = value ?? default(global::System.DateTime); } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoPolicyState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoPolicyState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoPolicyState = value ?? null; } + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoRecoveryModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryModel = value ?? null; } + + /// Number of backup copies available for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ExtendedInfoRecoveryPointCount = value ?? default(int); } + + /// Friendly name of the DB represented by this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Health details of different KPIs + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemKpisHealths KpisHealth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).KpisHealth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).KpisHealth = value ?? null /* model class */; } + + /// Error details in last backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail LastBackupErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetail = value ?? null /* model class */; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation; } + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus? LastBackupStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus)""); } + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastBackupTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupTime = value ?? default(global::System.DateTime); } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for FriendlyName + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).FriendlyName = value; } + + /// Internal Acessors for LastBackupErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailCode = value; } + + /// Internal Acessors for LastBackupErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailMessage = value; } + + /// Internal Acessors for LastBackupErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.LastBackupErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).LastBackupErrorDetailRecommendation = value; } + + /// Internal Acessors for ProtectionStatus + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal.ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus = value; } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType = value; } + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).NodesList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).NodesList = value ?? null /* arrayOf */; } + + /// Parent name of the DB such as Instance or Availability Group. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentName = value ?? null; } + + /// + /// Parent type of protected item, example: for a DB, standalone server or distributed + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ParentType = value ?? null; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).PolicyName = value ?? null; } + + /// Data ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectedItemDataSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemDataSourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemDataSourceId = value ?? null; } + + /// Health status of the backup item, evaluated based on last heartbeat received + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus? ProtectedItemHealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemHealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectedItemHealthStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus)""); } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState)""); } + + /// Backup status of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectionStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ProtectionStatus; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal)__azureVMWorkloadProtectedItem).ServerName = value ?? null; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__azureVMWorkloadProtectedItem).WorkloadType; } + + /// Creates an new instance. + public AzureVMWorkloadSqlDatabaseProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectedItem), __azureVMWorkloadProtectedItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectedItem), __azureVMWorkloadProtectedItem); + } + } + /// Azure VM workload-specific protected item representing SQL Database. + public partial interface IAzureVMWorkloadSqlDatabaseProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItem + { + + } + /// Azure VM workload-specific protected item representing SQL Database. + internal partial interface IAzureVMWorkloadSqlDatabaseProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectedItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectedItem.json.cs new file mode 100644 index 000000000000..3a5f553929dd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseProtectedItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protected item representing SQL Database. + public partial class AzureVMWorkloadSqlDatabaseProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSqlDatabaseProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectedItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSqlDatabaseProtectedItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectedItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseWorkloadItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseWorkloadItem.cs new file mode 100644 index 000000000000..03bdba2528a3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseWorkloadItem.cs @@ -0,0 +1,93 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SQL Database. + public partial class AzureVMWorkloadSqlDatabaseWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseWorkloadItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseWorkloadItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName = value ?? null; } + + /// Indicates if workload item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName = value ?? null; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SubWorkloadItemCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount = value ?? default(int); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type = value ; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType = value ?? null; } + + /// Creates an new instance. + public AzureVMWorkloadSqlDatabaseWorkloadItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + } + } + /// Azure VM workload-specific workload item representing SQL Database. + public partial interface IAzureVMWorkloadSqlDatabaseWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem + { + + } + /// Azure VM workload-specific workload item representing SQL Database. + internal partial interface IAzureVMWorkloadSqlDatabaseWorkloadItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseWorkloadItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseWorkloadItem.json.cs new file mode 100644 index 000000000000..2b46d00ad7d3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlDatabaseWorkloadItem.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SQL Database. + public partial class AzureVMWorkloadSqlDatabaseWorkloadItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSqlDatabaseWorkloadItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseWorkloadItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseWorkloadItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlDatabaseWorkloadItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSqlDatabaseWorkloadItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceProtectableItem.cs new file mode 100644 index 000000000000..035500325970 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceProtectableItem.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SQL Instance. + public partial class AzureVMWorkloadSqlInstanceProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceProtectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).FriendlyName = value ?? null; } + + /// Indicates if protectable item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtectable = value ?? default(bool); } + + /// Indicates if protectable item is auto-protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsAutoProtected = value ?? default(bool); } + + /// Indicates if item is protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).IsProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentName = value ?? null; } + + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ParentUniqueName = value ?? null; } + + /// Pre-backup validation for protectable objects + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation Prebackupvalidation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Prebackupvalidation = value ?? null /* model class */; } + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationCode = value ?? null; } + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PrebackupvalidationMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationMessage = value ?? null; } + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? PrebackupvalidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).PrebackupvalidationStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus)""); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subinquireditemcount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subprotectableitemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).Subprotectableitemcount = value ?? default(int); } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__azureVMWorkloadProtectableItem).WorkloadType = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureVMWorkloadSqlInstanceProtectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadProtectableItem), __azureVMWorkloadProtectableItem); + } + } + /// Azure VM workload-specific protectable item representing SQL Instance. + public partial interface IAzureVMWorkloadSqlInstanceProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItem + { + + } + /// Azure VM workload-specific protectable item representing SQL Instance. + internal partial interface IAzureVMWorkloadSqlInstanceProtectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadProtectableItemInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceProtectableItem.json.cs new file mode 100644 index 000000000000..aac03fc6a62b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceProtectableItem.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific protectable item representing SQL Instance. + public partial class AzureVMWorkloadSqlInstanceProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSqlInstanceProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadProtectableItem(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceProtectableItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSqlInstanceProtectableItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadProtectableItem?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceWorkloadItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceWorkloadItem.cs new file mode 100644 index 000000000000..e34a65de62cc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceWorkloadItem.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SQL Instance. + public partial class AzureVMWorkloadSqlInstanceWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceWorkloadItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceWorkloadItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).BackupManagementType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] _dataDirectoryPath; + + /// Data Directory Paths for default directories + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] DataDirectoryPath { get => this._dataDirectoryPath; set => this._dataDirectoryPath = value; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).FriendlyName = value ?? null; } + + /// Indicates if workload item is auto-protectable + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAutoProtectable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).IsAutoProtectable = value ?? default(bool); } + + /// Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ParentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ParentName = value ?? null; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Host/Cluster Name for instance or AG + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).ServerName = value ?? null; } + + /// For instance or AG, indicates number of DB's to be protected + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SubWorkloadItemCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).SubWorkloadItemCount = value ?? default(int); } + + /// For instance or AG, indicates number of DB's present + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? Subinquireditemcount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal)__azureVMWorkloadItem).Subinquireditemcount = value ?? default(int); } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).Type = value ; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)__azureVMWorkloadItem).WorkloadType = value ?? null; } + + /// Creates an new instance. + public AzureVMWorkloadSqlInstanceWorkloadItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + await eventListener.AssertObjectIsValid(nameof(__azureVMWorkloadItem), __azureVMWorkloadItem); + } + } + /// Azure VM workload-specific workload item representing SQL Instance. + public partial interface IAzureVMWorkloadSqlInstanceWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItem + { + /// Data Directory Paths for default directories + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Data Directory Paths for default directories", + SerializedName = @"dataDirectoryPaths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] DataDirectoryPath { get; set; } + + } + /// Azure VM workload-specific workload item representing SQL Instance. + internal partial interface IAzureVMWorkloadSqlInstanceWorkloadItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadItemInternal + { + /// Data Directory Paths for default directories + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] DataDirectoryPath { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceWorkloadItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceWorkloadItem.json.cs new file mode 100644 index 000000000000..c66e833d3035 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureVMWorkloadSqlInstanceWorkloadItem.json.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific workload item representing SQL Instance. + public partial class AzureVMWorkloadSqlInstanceWorkloadItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureVMWorkloadSqlInstanceWorkloadItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureVMWorkloadItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMWorkloadItem(json); + {_dataDirectoryPath = If( json?.PropertyT("dataDirectoryPaths"), out var __jsonDataDirectoryPaths) ? If( __jsonDataDirectoryPaths as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SqlDataDirectory.FromJson(__u) )) ))() : null : DataDirectoryPath;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceWorkloadItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceWorkloadItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureVMWorkloadSqlInstanceWorkloadItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureVMWorkloadSqlInstanceWorkloadItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureVMWorkloadItem?.ToJson(container, serializationMode); + if (null != this._dataDirectoryPath) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._dataDirectoryPath ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("dataDirectoryPaths",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadAutoProtectionIntent.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadAutoProtectionIntent.cs new file mode 100644 index 000000000000..5d838be379b3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadAutoProtectionIntent.cs @@ -0,0 +1,79 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Recovery Services Vault specific protection intent item. + public partial class AzureWorkloadAutoProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadAutoProtectionIntent, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadAutoProtectionIntentInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent __protectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ItemId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemId = value ?? null; } + + /// backup protectionIntent type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType ItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemType = value ; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).PolicyId = value ?? null; } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).SourceResourceId = value ?? null; } + + /// Creates an new instance. + public AzureWorkloadAutoProtectionIntent() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionIntent), __protectionIntent); + await eventListener.AssertObjectIsValid(nameof(__protectionIntent), __protectionIntent); + } + } + /// Azure Recovery Services Vault specific protection intent item. + public partial interface IAzureWorkloadAutoProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent + { + + } + /// Azure Recovery Services Vault specific protection intent item. + internal partial interface IAzureWorkloadAutoProtectionIntentInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadAutoProtectionIntent.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadAutoProtectionIntent.json.cs new file mode 100644 index 000000000000..70ac2379e966 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadAutoProtectionIntent.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Recovery Services Vault specific protection intent item. + public partial class AzureWorkloadAutoProtectionIntent + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadAutoProtectionIntent(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadAutoProtectionIntent. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadAutoProtectionIntent. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadAutoProtectionIntent FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadAutoProtectionIntent(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionIntent?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadBackupRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadBackupRequest.cs new file mode 100644 index 000000000000..f1c5aafed472 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadBackupRequest.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload workload-specific backup request. + public partial class AzureWorkloadBackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadBackupRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadBackupRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest __backupRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupRequest(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType? _backupType; + + /// Type of backup, viz. Full, Differential, Log or CopyOnlyFull + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType? BackupType { get => this._backupType; set => this._backupType = value; } + + /// Backing field for property. + private bool? _enableCompression; + + /// Bool for Compression setting + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? EnableCompression { get => this._enableCompression; set => this._enableCompression = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal)__backupRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal)__backupRequest).ObjectType = value ; } + + /// Backing field for property. + private global::System.DateTime? _recoveryPointExpiryTimeInUtc; + + /// Backup copy will expire after the time specified (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? RecoveryPointExpiryTimeInUtc { get => this._recoveryPointExpiryTimeInUtc; set => this._recoveryPointExpiryTimeInUtc = value; } + + /// Creates an new instance. + public AzureWorkloadBackupRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__backupRequest), __backupRequest); + await eventListener.AssertObjectIsValid(nameof(__backupRequest), __backupRequest); + } + } + /// AzureWorkload workload-specific backup request. + public partial interface IAzureWorkloadBackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest + { + /// Type of backup, viz. Full, Differential, Log or CopyOnlyFull + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup, viz. Full, Differential, Log or CopyOnlyFull", + SerializedName = @"backupType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType? BackupType { get; set; } + /// Bool for Compression setting + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Bool for Compression setting", + SerializedName = @"enableCompression", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableCompression { get; set; } + /// Backup copy will expire after the time specified (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup copy will expire after the time specified (UTC).", + SerializedName = @"recoveryPointExpiryTimeInUTC", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RecoveryPointExpiryTimeInUtc { get; set; } + + } + /// AzureWorkload workload-specific backup request. + internal partial interface IAzureWorkloadBackupRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal + { + /// Type of backup, viz. Full, Differential, Log or CopyOnlyFull + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType? BackupType { get; set; } + /// Bool for Compression setting + bool? EnableCompression { get; set; } + /// Backup copy will expire after the time specified (UTC). + global::System.DateTime? RecoveryPointExpiryTimeInUtc { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadBackupRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadBackupRequest.json.cs new file mode 100644 index 000000000000..dc09117f59b2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadBackupRequest.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload workload-specific backup request. + public partial class AzureWorkloadBackupRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadBackupRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __backupRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupRequest(json); + {_backupType = If( json?.PropertyT("backupType"), out var __jsonBackupType) ? (string)__jsonBackupType : (string)BackupType;} + {_enableCompression = If( json?.PropertyT("enableCompression"), out var __jsonEnableCompression) ? (bool?)__jsonEnableCompression : EnableCompression;} + {_recoveryPointExpiryTimeInUtc = If( json?.PropertyT("recoveryPointExpiryTimeInUTC"), out var __jsonRecoveryPointExpiryTimeInUtc) ? global::System.DateTime.TryParse((string)__jsonRecoveryPointExpiryTimeInUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRecoveryPointExpiryTimeInUtcValue) ? __jsonRecoveryPointExpiryTimeInUtcValue : RecoveryPointExpiryTimeInUtc : RecoveryPointExpiryTimeInUtc;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadBackupRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadBackupRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadBackupRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadBackupRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __backupRequest?.ToJson(container, serializationMode); + AddIf( null != (((object)this._backupType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupType.ToString()) : null, "backupType" ,container.Add ); + AddIf( null != this._enableCompression ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._enableCompression) : null, "enableCompression" ,container.Add ); + AddIf( null != this._recoveryPointExpiryTimeInUtc ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointExpiryTimeInUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "recoveryPointExpiryTimeInUTC" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainer.cs new file mode 100644 index 000000000000..795eeaf8b73b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainer.cs @@ -0,0 +1,305 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container for the workloads running inside Azure Compute or Classic Compute. + public partial class AzureWorkloadContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType = value ; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).ErrorDetailCode; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).ErrorDetailMessage; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).ErrorDetailRecommendation; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo _extendedInfo; + + /// Additional details of a workload container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadContainerExtendedInfo()); set => this._extendedInfo = value; } + + /// + /// Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoHostServerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).HostServerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).HostServerName = value ?? null; } + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] ExtendedInfoNodesList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).NodesList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).NodesList = value ?? null /* arrayOf */; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus = value ?? null; } + + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryInfoInquiryDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).InquiryInfoInquiryDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).InquiryInfoInquiryDetail = value ?? null /* arrayOf */; } + + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string InquiryInfoStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).InquiryInfoStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).InquiryInfoStatus = value ?? null; } + + /// Backing field for property. + private global::System.DateTime? _lastUpdatedTime; + + /// Time stamp when this container was updated. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastUpdatedTime { get => this._lastUpdatedTime; set => this._lastUpdatedTime = value; } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).ErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).ErrorDetailCode = value; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).ErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).ErrorDetailMessage = value; } + + /// Internal Acessors for ErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).ErrorDetailRecommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).ErrorDetailRecommendation = value; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadContainerExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Internal Acessors for ExtendedInfoInquiryInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.ExtendedInfoInquiryInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).InquiryInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).InquiryInfo = value; } + + /// Internal Acessors for InquiryInfoErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerInternal.InquiryInfoErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).InquiryInfoErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal)ExtendedInfo).InquiryInfoErrorDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? _operationType; + + /// Re-Do Operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? OperationType { get => this._operationType; set => this._operationType = value; } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus = value ?? null; } + + /// Backing field for property. + private string _sourceResourceId; + + /// ARM ID of the virtual machine represented by this Azure Workload Container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? _workloadType; + + /// Workload type for which registration was sent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public AzureWorkloadContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionContainer), __protectionContainer); + await eventListener.AssertObjectIsValid(nameof(__protectionContainer), __protectionContainer); + } + } + /// Container for the workloads running inside Azure Compute or Classic Compute. + public partial interface IAzureWorkloadContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; } + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Message related to the Code.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; } + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of recommendation strings.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] ErrorDetailRecommendation { get; } + /// + /// Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Host Os Name in case of Stand Alone and Cluster Name in case of distributed container.", + SerializedName = @"hostServerName", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoHostServerName { get; set; } + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of the nodes in case of distributed container.", + SerializedName = @"nodesList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] ExtendedInfoNodesList { get; set; } + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Inquiry Details which will have workload specific details. + For e.g. - For SQL and oracle this will contain different details.", + SerializedName = @"inquiryDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryInfoInquiryDetail { get; set; } + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Inquiry Status for this container such as + InProgress | Failed | Succeeded", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string InquiryInfoStatus { get; set; } + /// Time stamp when this container was updated. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time stamp when this container was updated.", + SerializedName = @"lastUpdatedTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastUpdatedTime { get; set; } + /// Re-Do Operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Re-Do Operation", + SerializedName = @"operationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? OperationType { get; set; } + /// ARM ID of the virtual machine represented by this Azure Workload Container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM ID of the virtual machine represented by this Azure Workload Container", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + /// Workload type for which registration was sent. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload type for which registration was sent.", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } + /// Container for the workloads running inside Azure Compute or Classic Compute. + internal partial interface IAzureWorkloadContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal + { + /// Error code. + string ErrorDetailCode { get; set; } + /// Error Message related to the Code. + string ErrorDetailMessage { get; set; } + /// List of recommendation strings. + string[] ErrorDetailRecommendation { get; set; } + /// Additional details of a workload container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo ExtendedInfo { get; set; } + /// + /// Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + /// + string ExtendedInfoHostServerName { get; set; } + /// Inquiry Status for the container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo ExtendedInfoInquiryInfo { get; set; } + /// List of the nodes in case of distributed container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] ExtendedInfoNodesList { get; set; } + /// Error Details if the Status is non-success. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail InquiryInfoErrorDetail { get; set; } + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryInfoInquiryDetail { get; set; } + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + string InquiryInfoStatus { get; set; } + /// Time stamp when this container was updated. + global::System.DateTime? LastUpdatedTime { get; set; } + /// Re-Do Operation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType? OperationType { get; set; } + /// ARM ID of the virtual machine represented by this Azure Workload Container + string SourceResourceId { get; set; } + /// Workload type for which registration was sent. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainer.json.cs new file mode 100644 index 000000000000..790c6b8d0380 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainer.json.cs @@ -0,0 +1,137 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container for the workloads running inside Azure Compute or Classic Compute. + public partial class AzureWorkloadContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadContainerExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + {_lastUpdatedTime = If( json?.PropertyT("lastUpdatedTime"), out var __jsonLastUpdatedTime) ? global::System.DateTime.TryParse((string)__jsonLastUpdatedTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastUpdatedTimeValue) ? __jsonLastUpdatedTimeValue : LastUpdatedTime : LastUpdatedTime;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + {_operationType = If( json?.PropertyT("operationType"), out var __jsonOperationType) ? (string)__jsonOperationType : (string)OperationType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainer. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainer interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("containerType") ) + { + case "SQLAGWorkLoadContainer": + { + return new AzureSqlagWorkloadContainerProtectionContainer(json); + } + case "VMAppContainer": + { + return new AzureVMAppContainerProtectionContainer(json); + } + } + return new AzureWorkloadContainer(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionContainer?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AddIf( null != this._lastUpdatedTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastUpdatedTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastUpdatedTime" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + AddIf( null != (((object)this._operationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._operationType.ToString()) : null, "operationType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerAutoProtectionIntent.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerAutoProtectionIntent.cs new file mode 100644 index 000000000000..c5b1cf100a21 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerAutoProtectionIntent.cs @@ -0,0 +1,81 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure workload specific protection intent item. + public partial class AzureWorkloadContainerAutoProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerAutoProtectionIntent, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerAutoProtectionIntentInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent __protectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ItemId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemId = value ?? null; } + + /// backup protectionIntent type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType ItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ItemType = value ; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).PolicyId = value ?? null; } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__protectionIntent).SourceResourceId = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureWorkloadContainerAutoProtectionIntent() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionIntent), __protectionIntent); + await eventListener.AssertObjectIsValid(nameof(__protectionIntent), __protectionIntent); + } + } + /// Azure workload specific protection intent item. + public partial interface IAzureWorkloadContainerAutoProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent + { + + } + /// Azure workload specific protection intent item. + internal partial interface IAzureWorkloadContainerAutoProtectionIntentInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerAutoProtectionIntent.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerAutoProtectionIntent.json.cs new file mode 100644 index 000000000000..5f9626407891 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerAutoProtectionIntent.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure workload specific protection intent item. + public partial class AzureWorkloadContainerAutoProtectionIntent + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadContainerAutoProtectionIntent(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerAutoProtectionIntent. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerAutoProtectionIntent. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerAutoProtectionIntent FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadContainerAutoProtectionIntent(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionIntent?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerExtendedInfo.cs new file mode 100644 index 000000000000..f1442e758257 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerExtendedInfo.cs @@ -0,0 +1,190 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Extended information of the container. + public partial class AzureWorkloadContainerExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal + { + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetailCode; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetailMessage; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetailRecommendation; } + + /// Backing field for property. + private string _hostServerName; + + /// + /// Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string HostServerName { get => this._hostServerName; set => this._hostServerName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo _inquiryInfo; + + /// Inquiry Status for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo InquiryInfo { get => (this._inquiryInfo = this._inquiryInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InquiryInfo()); set => this._inquiryInfo = value; } + + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryInfoInquiryDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).InquiryDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).InquiryDetail = value ?? null /* arrayOf */; } + + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string InquiryInfoStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).Status = value ?? null; } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetailCode = value; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetailMessage = value; } + + /// Internal Acessors for ErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal.ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetailRecommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetailRecommendation = value; } + + /// Internal Acessors for InquiryInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal.InquiryInfo { get => (this._inquiryInfo = this._inquiryInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InquiryInfo()); set { {_inquiryInfo = value;} } } + + /// Internal Acessors for InquiryInfoErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfoInternal.InquiryInfoErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal)InquiryInfo).ErrorDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] _nodesList; + + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get => this._nodesList; set => this._nodesList = value; } + + /// Creates an new instance. + public AzureWorkloadContainerExtendedInfo() + { + + } + } + /// Extended information of the container. + public partial interface IAzureWorkloadContainerExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; } + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Message related to the Code.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; } + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of recommendation strings.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] ErrorDetailRecommendation { get; } + /// + /// Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Host Os Name in case of Stand Alone and Cluster Name in case of distributed container.", + SerializedName = @"hostServerName", + PossibleTypes = new [] { typeof(string) })] + string HostServerName { get; set; } + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Inquiry Details which will have workload specific details. + For e.g. - For SQL and oracle this will contain different details.", + SerializedName = @"inquiryDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryInfoInquiryDetail { get; set; } + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Inquiry Status for this container such as + InProgress | Failed | Succeeded", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string InquiryInfoStatus { get; set; } + /// List of the nodes in case of distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of the nodes in case of distributed container.", + SerializedName = @"nodesList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get; set; } + + } + /// Extended information of the container. + internal partial interface IAzureWorkloadContainerExtendedInfoInternal + + { + /// Error code. + string ErrorDetailCode { get; set; } + /// Error Message related to the Code. + string ErrorDetailMessage { get; set; } + /// List of recommendation strings. + string[] ErrorDetailRecommendation { get; set; } + /// + /// Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + /// + string HostServerName { get; set; } + /// Inquiry Status for the container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo InquiryInfo { get; set; } + /// Error Details if the Status is non-success. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail InquiryInfoErrorDetail { get; set; } + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryInfoInquiryDetail { get; set; } + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + string InquiryInfoStatus { get; set; } + /// List of the nodes in case of distributed container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo[] NodesList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerExtendedInfo.json.cs new file mode 100644 index 000000000000..13a5fa297ca5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadContainerExtendedInfo.json.cs @@ -0,0 +1,121 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Extended information of the container. + public partial class AzureWorkloadContainerExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadContainerExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_inquiryInfo = If( json?.PropertyT("inquiryInfo"), out var __jsonInquiryInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InquiryInfo.FromJson(__jsonInquiryInfo) : InquiryInfo;} + {_hostServerName = If( json?.PropertyT("hostServerName"), out var __jsonHostServerName) ? (string)__jsonHostServerName : (string)HostServerName;} + {_nodesList = If( json?.PropertyT("nodesList"), out var __jsonNodesList) ? If( __jsonNodesList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DistributedNodesInfo.FromJson(__u) )) ))() : null : NodesList;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadContainerExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadContainerExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._inquiryInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._inquiryInfo.ToJson(null,serializationMode) : null, "inquiryInfo" ,container.Add ); + AddIf( null != (((object)this._hostServerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._hostServerName.ToString()) : null, "hostServerName" ,container.Add ); + if (null != this._nodesList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._nodesList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("nodesList",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadErrorInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadErrorInfo.cs new file mode 100644 index 000000000000..86a5cfc4afc3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadErrorInfo.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage specific error information + public partial class AzureWorkloadErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfoInternal + { + + /// Backing field for property. + private string _additionalDetail; + + /// Additional details for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AdditionalDetail { get => this._additionalDetail; set => this._additionalDetail = value; } + + /// Backing field for property. + private int? _errorCode; + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ErrorCode { get => this._errorCode; set => this._errorCode = value; } + + /// Backing field for property. + private string _errorString; + + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorString { get => this._errorString; set => this._errorString = value; } + + /// Backing field for property. + private string _errorTitle; + + /// Title: Typically, the entity that the error pertains to. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorTitle { get => this._errorTitle; set => this._errorTitle = value; } + + /// Backing field for property. + private string[] _recommendation; + + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Recommendation { get => this._recommendation; set => this._recommendation = value; } + + /// Creates an new instance. + public AzureWorkloadErrorInfo() + { + + } + } + /// Azure storage specific error information + public partial interface IAzureWorkloadErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Additional details for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional details for above error code.", + SerializedName = @"additionalDetails", + PossibleTypes = new [] { typeof(string) })] + string AdditionalDetail { get; set; } + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error code.", + SerializedName = @"errorCode", + PossibleTypes = new [] { typeof(int) })] + int? ErrorCode { get; set; } + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Localized error string.", + SerializedName = @"errorString", + PossibleTypes = new [] { typeof(string) })] + string ErrorString { get; set; } + /// Title: Typically, the entity that the error pertains to. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Title: Typically, the entity that the error pertains to.", + SerializedName = @"errorTitle", + PossibleTypes = new [] { typeof(string) })] + string ErrorTitle { get; set; } + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of localized recommendations for above error code.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] Recommendation { get; set; } + + } + /// Azure storage specific error information + internal partial interface IAzureWorkloadErrorInfoInternal + + { + /// Additional details for above error code. + string AdditionalDetail { get; set; } + /// Error code. + int? ErrorCode { get; set; } + /// Localized error string. + string ErrorString { get; set; } + /// Title: Typically, the entity that the error pertains to. + string ErrorTitle { get; set; } + /// List of localized recommendations for above error code. + string[] Recommendation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadErrorInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadErrorInfo.json.cs new file mode 100644 index 000000000000..84d84a08f429 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadErrorInfo.json.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage specific error information + public partial class AzureWorkloadErrorInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadErrorInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorCode = If( json?.PropertyT("errorCode"), out var __jsonErrorCode) ? (int?)__jsonErrorCode : ErrorCode;} + {_errorString = If( json?.PropertyT("errorString"), out var __jsonErrorString) ? (string)__jsonErrorString : (string)ErrorString;} + {_errorTitle = If( json?.PropertyT("errorTitle"), out var __jsonErrorTitle) ? (string)__jsonErrorTitle : (string)ErrorTitle;} + {_recommendation = If( json?.PropertyT("recommendations"), out var __jsonRecommendations) ? If( __jsonRecommendations as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Recommendation;} + {_additionalDetail = If( json?.PropertyT("additionalDetails"), out var __jsonAdditionalDetails) ? (string)__jsonAdditionalDetails : (string)AdditionalDetail;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadErrorInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._errorCode ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._errorCode) : null, "errorCode" ,container.Add ); + AddIf( null != (((object)this._errorString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorString.ToString()) : null, "errorString" ,container.Add ); + AddIf( null != (((object)this._errorTitle)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorTitle.ToString()) : null, "errorTitle" ,container.Add ); + if (null != this._recommendation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recommendation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("recommendations",__w); + } + AddIf( null != (((object)this._additionalDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._additionalDetail.ToString()) : null, "additionalDetails" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJob.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJob.cs new file mode 100644 index 000000000000..642eebcdad9f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJob.cs @@ -0,0 +1,209 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage specific job. + public partial class AzureWorkloadJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJob, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] _actionsInfo; + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get => this._actionsInfo; set => this._actionsInfo = value; } + + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ActivityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId = value ?? null; } + + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime = value ?? default(global::System.DateTime); } + + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EntityFriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo[] _errorDetail; + + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo[] ErrorDetail { get => this._errorDetail; set => this._errorDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfo _extendedInfo; + + /// Additional information about the job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadJobExtendedInfo()); set => this._extendedInfo = value; } + + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoDynamicErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage = value ?? null; } + + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoInternal)ExtendedInfo).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoInternal)ExtendedInfo).PropertyBag = value ?? null /* model class */; } + + /// List of tasks for this job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails[] ExtendedInfoTasksList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoInternal)ExtendedInfo).TasksList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoInternal)ExtendedInfo).TasksList = value ?? null /* arrayOf */; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadJobExtendedInfo()); set { {_extendedInfo = value;} } } + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation = value ?? null; } + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime = value ?? default(global::System.DateTime); } + + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status = value ?? null; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type = value ; } + + /// Backing field for property. + private string _workloadType; + + /// Workload type of the job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public AzureWorkloadJob() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__job), __job); + await eventListener.AssertObjectIsValid(nameof(__job), __job); + } + } + /// Azure storage specific job. + public partial interface IAzureWorkloadJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the state/actions applicable on this job like cancel/retry.", + SerializedName = @"actionsInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time elapsed during the execution of this job.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error details on execution of this job.", + SerializedName = @"errorDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo[] ErrorDetail { get; set; } + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message on job execution.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoDynamicErrorMessage { get; set; } + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks for this job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks for this job", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Workload type of the job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload type of the job", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(string) })] + string WorkloadType { get; set; } + + } + /// Azure storage specific job. + internal partial interface IAzureWorkloadJobInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Time elapsed during the execution of this job. + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo[] ErrorDetail { get; set; } + /// Additional information about the job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfo ExtendedInfo { get; set; } + /// Non localized error message on job execution. + string ExtendedInfoDynamicErrorMessage { get; set; } + /// Job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks for this job + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Workload type of the job + string WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJob.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJob.json.cs new file mode 100644 index 000000000000..5c67982d99ec --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJob.json.cs @@ -0,0 +1,134 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure storage specific job. + public partial class AzureWorkloadJob + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadJob(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadJobExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_actionsInfo = If( json?.PropertyT("actionsInfo"), out var __jsonActionsInfo) ? If( __jsonActionsInfo as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)""))) ))() : null : ActionsInfo;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? If( __jsonErrorDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadErrorInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadErrorInfo.FromJson(__p) )) ))() : null : ErrorDetail;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJob. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJob. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadJob(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __job?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + if (null != this._actionsInfo) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._actionsInfo ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("actionsInfo",__w); + } + if (null != this._errorDetail) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._errorDetail ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("errorDetails",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfo.cs new file mode 100644 index 000000000000..3ead61519b80 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfo.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific additional information for job. + public partial class AzureWorkloadJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoInternal + { + + /// Backing field for property. + private string _dynamicErrorMessage; + + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DynamicErrorMessage { get => this._dynamicErrorMessage; set => this._dynamicErrorMessage = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag _propertyBag; + + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag PropertyBag { get => (this._propertyBag = this._propertyBag ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadJobExtendedInfoPropertyBag()); set => this._propertyBag = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails[] _tasksList; + + /// List of tasks for this job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails[] TasksList { get => this._tasksList; set => this._tasksList = value; } + + /// Creates an new instance. + public AzureWorkloadJobExtendedInfo() + { + + } + } + /// Azure VM workload-specific additional information for job. + public partial interface IAzureWorkloadJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message on job execution.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string DynamicErrorMessage { get; set; } + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks for this job + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks for this job", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails[] TasksList { get; set; } + + } + /// Azure VM workload-specific additional information for job. + internal partial interface IAzureWorkloadJobExtendedInfoInternal + + { + /// Non localized error message on job execution. + string DynamicErrorMessage { get; set; } + /// Job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks for this job + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails[] TasksList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfo.json.cs new file mode 100644 index 000000000000..5aafb3fdcf66 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfo.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload-specific additional information for job. + public partial class AzureWorkloadJobExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadJobExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_tasksList = If( json?.PropertyT("tasksList"), out var __jsonTasksList) ? If( __jsonTasksList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadJobTaskDetails.FromJson(__u) )) ))() : null : TasksList;} + {_propertyBag = If( json?.PropertyT("propertyBag"), out var __jsonPropertyBag) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadJobExtendedInfoPropertyBag.FromJson(__jsonPropertyBag) : PropertyBag;} + {_dynamicErrorMessage = If( json?.PropertyT("dynamicErrorMessage"), out var __jsonDynamicErrorMessage) ? (string)__jsonDynamicErrorMessage : (string)DynamicErrorMessage;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadJobExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._tasksList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._tasksList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tasksList",__w); + } + AddIf( null != this._propertyBag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._propertyBag.ToJson(null,serializationMode) : null, "propertyBag" ,container.Add ); + AddIf( null != (((object)this._dynamicErrorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dynamicErrorMessage.ToString()) : null, "dynamicErrorMessage" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfoPropertyBag.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfoPropertyBag.cs new file mode 100644 index 000000000000..742783500d2e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfoPropertyBag.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job properties. + public partial class AzureWorkloadJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBagInternal + { + + /// Creates an new instance. + public AzureWorkloadJobExtendedInfoPropertyBag() + { + + } + } + /// Job properties. + public partial interface IAzureWorkloadJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Job properties. + internal partial interface IAzureWorkloadJobExtendedInfoPropertyBagInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfoPropertyBag.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfoPropertyBag.dictionary.cs new file mode 100644 index 000000000000..8e5403b99251 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfoPropertyBag.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureWorkloadJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadJobExtendedInfoPropertyBag source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfoPropertyBag.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfoPropertyBag.json.cs new file mode 100644 index 000000000000..4f17f61ae3de --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobExtendedInfoPropertyBag.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job properties. + public partial class AzureWorkloadJobExtendedInfoPropertyBag + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureWorkloadJobExtendedInfoPropertyBag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobExtendedInfoPropertyBag FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadJobExtendedInfoPropertyBag(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobTaskDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobTaskDetails.cs new file mode 100644 index 000000000000..f04f8fa37870 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobTaskDetails.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload specific job task details. + public partial class AzureWorkloadJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetailsInternal + { + + /// Backing field for property. + private string _status; + + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private string _taskId; + + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TaskId { get => this._taskId; set => this._taskId = value; } + + /// Creates an new instance. + public AzureWorkloadJobTaskDetails() + { + + } + } + /// Azure VM workload specific job task details. + public partial interface IAzureWorkloadJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The task display name.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; set; } + + } + /// Azure VM workload specific job task details. + internal partial interface IAzureWorkloadJobTaskDetailsInternal + + { + /// The status. + string Status { get; set; } + /// The task display name. + string TaskId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobTaskDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobTaskDetails.json.cs new file mode 100644 index 000000000000..7a1cc85cc7f0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadJobTaskDetails.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM workload specific job task details. + public partial class AzureWorkloadJobTaskDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadJobTaskDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_taskId = If( json?.PropertyT("taskId"), out var __jsonTaskId) ? (string)__jsonTaskId : (string)TaskId;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadJobTaskDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadJobTaskDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._taskId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._taskId.ToString()) : null, "taskId" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRecoveryPoint.cs new file mode 100644 index 000000000000..1b73c327d30a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRecoveryPoint.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point specific to PointInTime + public partial class AzureWorkloadPointInTimeRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPointInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint __azureWorkloadRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRecoveryPoint(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadRecoveryPoint).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadRecoveryPoint).ObjectType = value ; } + + /// Eligibility of RP to be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointMoveReadinessInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointMoveReadinessInfo = value ?? null /* model class */; } + + /// Properties of Recovery Point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointProperty = value ?? null /* model class */; } + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyExpiryTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyExpiryTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyExpiryTime = value ?? null; } + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? RecoveryPointPropertyIsSoftDeleted { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyIsSoftDeleted; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyIsSoftDeleted = value ?? default(bool); } + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyRuleName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyRuleName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyRuleName = value ?? null; } + + /// Recovery point tier information. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTierDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTierDetail = value ?? null /* arrayOf */; } + + /// UTC time at which recovery point was created + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? RecoveryPointTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTimeInUtc = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange[] _timeRange; + + /// List of log ranges + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange[] TimeRange { get => this._timeRange; set => this._timeRange = value; } + + /// Type of restore point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType)""); } + + /// Creates an new instance. + public AzureWorkloadPointInTimeRecoveryPoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadRecoveryPoint), __azureWorkloadRecoveryPoint); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadRecoveryPoint), __azureWorkloadRecoveryPoint); + } + } + /// Recovery point specific to PointInTime + public partial interface IAzureWorkloadPointInTimeRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint + { + /// List of log ranges + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of log ranges", + SerializedName = @"timeRanges", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange[] TimeRange { get; set; } + + } + /// Recovery point specific to PointInTime + internal partial interface IAzureWorkloadPointInTimeRecoveryPointInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal + { + /// List of log ranges + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange[] TimeRange { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRecoveryPoint.json.cs new file mode 100644 index 000000000000..47b215721d45 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRecoveryPoint.json.cs @@ -0,0 +1,135 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point specific to PointInTime + public partial class AzureWorkloadPointInTimeRecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadPointInTimeRecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRecoveryPoint(json); + {_timeRange = If( json?.PropertyT("timeRanges"), out var __jsonTimeRanges) ? If( __jsonTimeRanges as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PointInTimeRange.FromJson(__u) )) ))() : null : TimeRange;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPoint. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPoint + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureWorkloadSAPHanaPointInTimeRecoveryPoint": + { + return new AzureWorkloadSapHanaPointInTimeRecoveryPoint(json); + } + } + return new AzureWorkloadPointInTimeRecoveryPoint(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadRecoveryPoint?.ToJson(container, serializationMode); + if (null != this._timeRange) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._timeRange ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("timeRanges",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRestoreRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRestoreRequest.cs new file mode 100644 index 000000000000..48b40fcb8a3b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRestoreRequest.cs @@ -0,0 +1,171 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore + /// + public partial class AzureWorkloadPointInTimeRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRestoreRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRestoreRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType = value ; } + + /// Backing field for property. + private global::System.DateTime? _pointInTime; + + /// PointInTime value + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? PointInTime { get => this._pointInTime; set => this._pointInTime = value; } + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag = value ?? null /* model class */; } + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode)""); } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount = value ?? default(bool); } + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId = value ?? null; } + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo = value ?? null /* model class */; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore = value ?? null; } + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName = value ?? null; } + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail = value ?? null /* model class */; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value ?? null /* model class */; } + + /// Creates an new instance. + public AzureWorkloadPointInTimeRestoreRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + } + } + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore + public partial interface IAzureWorkloadPointInTimeRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest + { + /// PointInTime value + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"PointInTime value", + SerializedName = @"pointInTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? PointInTime { get; set; } + + } + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore + internal partial interface IAzureWorkloadPointInTimeRestoreRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal + { + /// PointInTime value + global::System.DateTime? PointInTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRestoreRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRestoreRequest.json.cs new file mode 100644 index 000000000000..d5abb35c9609 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadPointInTimeRestoreRequest.json.cs @@ -0,0 +1,113 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore + /// + public partial class AzureWorkloadPointInTimeRestoreRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadPointInTimeRestoreRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(json); + {_pointInTime = If( json?.PropertyT("pointInTime"), out var __jsonPointInTime) ? global::System.DateTime.TryParse((string)__jsonPointInTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonPointInTimeValue) ? __jsonPointInTimeValue : PointInTime : PointInTime;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRestoreRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRestoreRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRestoreRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadPointInTimeRestoreRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadRestoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._pointInTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._pointInTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "pointInTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPoint.cs new file mode 100644 index 000000000000..458580c758c0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPoint.cs @@ -0,0 +1,183 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Workload specific recovery point, specifically encapsulates full/diff recovery point + /// + public partial class AzureWorkloadRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint __recoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint(); + + /// Internal Acessors for RecoveryPointProperty + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal.RecoveryPointProperty { get => (this._recoveryPointProperty = this._recoveryPointProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties()); set { {_recoveryPointProperty = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__recoveryPoint).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__recoveryPoint).ObjectType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo _recoveryPointMoveReadinessInfo; + + /// Eligibility of RP to be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get => (this._recoveryPointMoveReadinessInfo = this._recoveryPointMoveReadinessInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRecoveryPointMoveReadinessInfo()); set => this._recoveryPointMoveReadinessInfo = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties _recoveryPointProperty; + + /// Properties of Recovery Point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get => (this._recoveryPointProperty = this._recoveryPointProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties()); set => this._recoveryPointProperty = value; } + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointPropertyExpiryTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).ExpiryTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).ExpiryTime = value ?? null; } + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? RecoveryPointPropertyIsSoftDeleted { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).IsSoftDeleted; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).IsSoftDeleted = value ?? default(bool); } + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointPropertyRuleName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).RuleName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).RuleName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] _recoveryPointTierDetail; + + /// Recovery point tier information. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get => this._recoveryPointTierDetail; set => this._recoveryPointTierDetail = value; } + + /// Backing field for property. + private global::System.DateTime? _recoveryPointTimeInUtc; + + /// UTC time at which recovery point was created + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? RecoveryPointTimeInUtc { get => this._recoveryPointTimeInUtc; set => this._recoveryPointTimeInUtc = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType? _type; + + /// Type of restore point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType? Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public AzureWorkloadRecoveryPoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__recoveryPoint), __recoveryPoint); + await eventListener.AssertObjectIsValid(nameof(__recoveryPoint), __recoveryPoint); + } + } + /// Workload specific recovery point, specifically encapsulates full/diff recovery point + public partial interface IAzureWorkloadRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint + { + /// Eligibility of RP to be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Eligibility of RP to be moved to another tier", + SerializedName = @"recoveryPointMoveReadinessInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get; set; } + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Expiry time of Recovery Point in UTC.", + SerializedName = @"expiryTime", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointPropertyExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Bool to indicate whether RP is in soft delete state or not", + SerializedName = @"isSoftDeleted", + PossibleTypes = new [] { typeof(bool) })] + bool? RecoveryPointPropertyIsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rule name tagged on Recovery Point that governs life cycle", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointPropertyRuleName { get; set; } + /// Recovery point tier information. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Recovery point tier information.", + SerializedName = @"recoveryPointTierDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get; set; } + /// UTC time at which recovery point was created + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"UTC time at which recovery point was created", + SerializedName = @"recoveryPointTimeInUTC", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RecoveryPointTimeInUtc { get; set; } + /// Type of restore point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of restore point", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType? Type { get; set; } + + } + /// Workload specific recovery point, specifically encapsulates full/diff recovery point + internal partial interface IAzureWorkloadRecoveryPointInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal + { + /// Eligibility of RP to be moved to another tier + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get; set; } + /// Properties of Recovery Point + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get; set; } + /// Expiry time of Recovery Point in UTC. + string RecoveryPointPropertyExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + bool? RecoveryPointPropertyIsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + string RecoveryPointPropertyRuleName { get; set; } + /// Recovery point tier information. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get; set; } + /// UTC time at which recovery point was created + global::System.DateTime? RecoveryPointTimeInUtc { get; set; } + /// Type of restore point + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType? Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPoint.json.cs new file mode 100644 index 000000000000..3c4711dc057e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPoint.json.cs @@ -0,0 +1,159 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Workload specific recovery point, specifically encapsulates full/diff recovery point + /// + public partial class AzureWorkloadRecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadRecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __recoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint(json); + {_recoveryPointProperty = If( json?.PropertyT("recoveryPointProperties"), out var __jsonRecoveryPointProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties.FromJson(__jsonRecoveryPointProperties) : RecoveryPointProperty;} + {_recoveryPointTimeInUtc = If( json?.PropertyT("recoveryPointTimeInUTC"), out var __jsonRecoveryPointTimeInUtc) ? global::System.DateTime.TryParse((string)__jsonRecoveryPointTimeInUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRecoveryPointTimeInUtcValue) ? __jsonRecoveryPointTimeInUtcValue : RecoveryPointTimeInUtc : RecoveryPointTimeInUtc;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_recoveryPointTierDetail = If( json?.PropertyT("recoveryPointTierDetails"), out var __jsonRecoveryPointTierDetails) ? If( __jsonRecoveryPointTierDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointTierInformationV2.FromJson(__u) )) ))() : null : RecoveryPointTierDetail;} + {_recoveryPointMoveReadinessInfo = If( json?.PropertyT("recoveryPointMoveReadinessInfo"), out var __jsonRecoveryPointMoveReadinessInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRecoveryPointMoveReadinessInfo.FromJson(__jsonRecoveryPointMoveReadinessInfo) : RecoveryPointMoveReadinessInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureWorkloadPointInTimeRecoveryPoint": + { + return new AzureWorkloadPointInTimeRecoveryPoint(json); + } + case "AzureWorkloadSAPHanaPointInTimeRecoveryPoint": + { + return new AzureWorkloadSapHanaPointInTimeRecoveryPoint(json); + } + case "AzureWorkloadSAPHanaRecoveryPoint": + { + return new AzureWorkloadSapHanaRecoveryPoint(json); + } + case "AzureWorkloadSQLRecoveryPoint": + { + return new AzureWorkloadSqlRecoveryPoint(json); + } + case "AzureWorkloadSQLPointInTimeRecoveryPoint": + { + return new AzureWorkloadSqlPointInTimeRecoveryPoint(json); + } + } + return new AzureWorkloadRecoveryPoint(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __recoveryPoint?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointProperty ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointProperty.ToJson(null,serializationMode) : null, "recoveryPointProperties" ,container.Add ); + AddIf( null != this._recoveryPointTimeInUtc ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointTimeInUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "recoveryPointTimeInUTC" ,container.Add ); + 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 ); + if (null != this._recoveryPointTierDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recoveryPointTierDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("recoveryPointTierDetails",__w); + } + AddIf( null != this._recoveryPointMoveReadinessInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointMoveReadinessInfo.ToJson(null,serializationMode) : null, "recoveryPointMoveReadinessInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPointMoveReadinessInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPointMoveReadinessInfo.cs new file mode 100644 index 000000000000..a2695704cf5b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPointMoveReadinessInfo.cs @@ -0,0 +1,37 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Eligibility of RP to be moved to another tier + public partial class AzureWorkloadRecoveryPointMoveReadinessInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfoInternal + { + + /// + /// Creates an new instance. + /// + public AzureWorkloadRecoveryPointMoveReadinessInfo() + { + + } + } + /// Eligibility of RP to be moved to another tier + public partial interface IAzureWorkloadRecoveryPointMoveReadinessInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Eligibility of RP to be moved to another tier + internal partial interface IAzureWorkloadRecoveryPointMoveReadinessInfoInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPointMoveReadinessInfo.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPointMoveReadinessInfo.dictionary.cs new file mode 100644 index 000000000000..35c4822444e7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPointMoveReadinessInfo.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureWorkloadRecoveryPointMoveReadinessInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRecoveryPointMoveReadinessInfo source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPointMoveReadinessInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPointMoveReadinessInfo.json.cs new file mode 100644 index 000000000000..a3c130a5d490 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRecoveryPointMoveReadinessInfo.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Eligibility of RP to be moved to another tier + public partial class AzureWorkloadRecoveryPointMoveReadinessInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureWorkloadRecoveryPointMoveReadinessInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointMoveReadinessInfo.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadRecoveryPointMoveReadinessInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequest.cs new file mode 100644 index 000000000000..21a2fd17d596 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequest.cs @@ -0,0 +1,374 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload-specific restore. + public partial class AzureWorkloadRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest __restoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest(); + + /// Internal Acessors for SnapshotRestoreParameter + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal.SnapshotRestoreParameter { get => (this._snapshotRestoreParameter = this._snapshotRestoreParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SnapshotRestoreParameters()); set { {_snapshotRestoreParameter = value;} } } + + /// Internal Acessors for TargetInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal.TargetInfo { get => (this._targetInfo = this._targetInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TargetRestoreInfo()); set { {_targetInfo = value;} } } + + /// Internal Acessors for UserAssignedManagedIdentityDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal.UserAssignedManagedIdentityDetail { get => (this._userAssignedManagedIdentityDetail = this._userAssignedManagedIdentityDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UserAssignedManagedIdentityDetails()); set { {_userAssignedManagedIdentityDetail = value;} } } + + /// + /// Internal Acessors for UserAssignedManagedIdentityDetailUserAssignedIdentityProperty + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal.UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityProperty = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ObjectType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag _propertyBag; + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => (this._propertyBag = this._propertyBag ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequestPropertyBag()); set => this._propertyBag = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? _recoveryMode; + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => this._recoveryMode; set => this._recoveryMode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? _recoveryType; + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => this._recoveryType; set => this._recoveryType = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters _snapshotRestoreParameter; + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => (this._snapshotRestoreParameter = this._snapshotRestoreParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SnapshotRestoreParameters()); set => this._snapshotRestoreParameter = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParametersInternal)SnapshotRestoreParameter).LogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParametersInternal)SnapshotRestoreParameter).LogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParametersInternal)SnapshotRestoreParameter).SkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParametersInternal)SnapshotRestoreParameter).SkipAttachAndMount = value ?? default(bool); } + + /// Backing field for property. + private string _sourceResourceId; + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo _targetInfo; + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => (this._targetInfo = this._targetInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TargetRestoreInfo()); set => this._targetInfo = value; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfoInternal)TargetInfo).ContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfoInternal)TargetInfo).ContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfoInternal)TargetInfo).DatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfoInternal)TargetInfo).DatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfoInternal)TargetInfo).OverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfoInternal)TargetInfo).OverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfoInternal)TargetInfo).TargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfoInternal)TargetInfo).TargetDirectoryForFileRestore = value ?? null; } + + /// Backing field for property. + private string _targetResourceGroupName; + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetResourceGroupName { get => this._targetResourceGroupName; set => this._targetResourceGroupName = value; } + + /// Backing field for property. + private string _targetVirtualMachineId; + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetVirtualMachineId { get => this._targetVirtualMachineId; set => this._targetVirtualMachineId = value; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails _userAssignedManagedIdentityDetail; + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => (this._userAssignedManagedIdentityDetail = this._userAssignedManagedIdentityDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UserAssignedManagedIdentityDetails()); set => this._userAssignedManagedIdentityDetail = value; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).IdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).IdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).IdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).IdentityName = value ?? null; } + + /// Creates an new instance. + public AzureWorkloadRestoreRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__restoreRequest), __restoreRequest); + await eventListener.AssertObjectIsValid(nameof(__restoreRequest), __restoreRequest); + } + } + /// AzureWorkload-specific restore. + public partial interface IAzureWorkloadRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest + { + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload specific property bag.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get; set; } + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines whether the current recovery mode is file restore or database restore", + SerializedName = @"recoveryMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get; set; } + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of this recovery.", + SerializedName = @"recoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"logPointInTimeForDBRecovery", + PossibleTypes = new [] { typeof(string) })] + string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"skipAttachAndMount", + PossibleTypes = new [] { typeof(bool) })] + bool? SnapshotRestoreParameterSkipAttachAndMount { get; set; } + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM ID of the VM on which workload that was running is being recovered.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource Id name of the container in which Target DataBase resides", + SerializedName = @"containerId", + PossibleTypes = new [] { typeof(string) })] + string TargetInfoContainerId { get; set; } + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana", + SerializedName = @"databaseName", + PossibleTypes = new [] { typeof(string) })] + string TargetInfoDatabaseName { get; set; } + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Can Overwrite if Target DataBase already exists", + SerializedName = @"overwriteOption", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get; set; } + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Target directory location for restore as files.", + SerializedName = @"targetDirectoryForFileRestore", + PossibleTypes = new [] { typeof(string) })] + string TargetInfoTargetDirectoryForFileRestore { get; set; } + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the Resource group of the Target VM", + SerializedName = @"targetResourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string TargetResourceGroupName { get; set; } + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the complete ARM Id of the target VM + For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}", + SerializedName = @"targetVirtualMachineId", + PossibleTypes = new [] { typeof(string) })] + string TargetVirtualMachineId { get; set; } + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The client ID of the assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentityPropertyClientId { get; set; } + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The principal ID of the assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentityPropertyPrincipalId { get; set; } + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ARM id of the assigned identity.", + SerializedName = @"identityArmId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedManagedIdentityDetailIdentityArmId { get; set; } + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the assigned identity.", + SerializedName = @"identityName", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedManagedIdentityDetailIdentityName { get; set; } + + } + /// AzureWorkload-specific restore. + internal partial interface IAzureWorkloadRestoreRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal + { + /// Workload specific property bag. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get; set; } + /// Defines whether the current recovery mode is file restore or database restore + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get; set; } + /// Type of this recovery. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get; set; } + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get; set; } + + string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get; set; } + + bool? SnapshotRestoreParameterSkipAttachAndMount { get; set; } + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + string SourceResourceId { get; set; } + /// Details of target database + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get; set; } + /// Resource Id name of the container in which Target DataBase resides + string TargetInfoContainerId { get; set; } + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + string TargetInfoDatabaseName { get; set; } + /// Can Overwrite if Target DataBase already exists + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get; set; } + /// Target directory location for restore as files. + string TargetInfoTargetDirectoryForFileRestore { get; set; } + /// Defines the Resource group of the Target VM + string TargetResourceGroupName { get; set; } + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + string TargetVirtualMachineId { get; set; } + /// The client ID of the assigned identity. + string UserAssignedIdentityPropertyClientId { get; set; } + /// The principal ID of the assigned identity. + string UserAssignedIdentityPropertyPrincipalId { get; set; } + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get; set; } + /// The ARM id of the assigned identity. + string UserAssignedManagedIdentityDetailIdentityArmId { get; set; } + /// The name of the assigned identity. + string UserAssignedManagedIdentityDetailIdentityName { get; set; } + /// User assigned managed identity properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequest.json.cs new file mode 100644 index 000000000000..2770038c4c17 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequest.json.cs @@ -0,0 +1,173 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload-specific restore. + public partial class AzureWorkloadRestoreRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadRestoreRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __restoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest(json); + {_targetInfo = If( json?.PropertyT("targetInfo"), out var __jsonTargetInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TargetRestoreInfo.FromJson(__jsonTargetInfo) : TargetInfo;} + {_userAssignedManagedIdentityDetail = If( json?.PropertyT("userAssignedManagedIdentityDetails"), out var __jsonUserAssignedManagedIdentityDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UserAssignedManagedIdentityDetails.FromJson(__jsonUserAssignedManagedIdentityDetails) : UserAssignedManagedIdentityDetail;} + {_snapshotRestoreParameter = If( json?.PropertyT("snapshotRestoreParameters"), out var __jsonSnapshotRestoreParameters) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SnapshotRestoreParameters.FromJson(__jsonSnapshotRestoreParameters) : SnapshotRestoreParameter;} + {_recoveryType = If( json?.PropertyT("recoveryType"), out var __jsonRecoveryType) ? (string)__jsonRecoveryType : (string)RecoveryType;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + {_propertyBag = If( json?.PropertyT("propertyBag"), out var __jsonPropertyBag) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequestPropertyBag.FromJson(__jsonPropertyBag) : PropertyBag;} + {_recoveryMode = If( json?.PropertyT("recoveryMode"), out var __jsonRecoveryMode) ? (string)__jsonRecoveryMode : (string)RecoveryMode;} + {_targetResourceGroupName = If( json?.PropertyT("targetResourceGroupName"), out var __jsonTargetResourceGroupName) ? (string)__jsonTargetResourceGroupName : (string)TargetResourceGroupName;} + {_targetVirtualMachineId = If( json?.PropertyT("targetVirtualMachineId"), out var __jsonTargetVirtualMachineId) ? (string)__jsonTargetVirtualMachineId : (string)TargetVirtualMachineId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureWorkloadPointInTimeRestoreRequest": + { + return new AzureWorkloadPointInTimeRestoreRequest(json); + } + case "AzureWorkloadSAPHanaPointInTimeRestoreRequest": + { + return new AzureWorkloadSapHanaPointInTimeRestoreRequest(json); + } + case "AzureWorkloadSAPHanaRestoreRequest": + { + return new AzureWorkloadSapHanaRestoreRequest(json); + } + case "AzureWorkloadSQLRestoreRequest": + { + return new AzureWorkloadSqlRestoreRequest(json); + } + case "AzureWorkloadSQLPointInTimeRestoreRequest": + { + return new AzureWorkloadSqlPointInTimeRestoreRequest(json); + } + case "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest": + { + return new AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest(json); + } + case "AzureWorkloadSAPHanaRestoreWithRehydrateRequest": + { + return new AzureWorkloadSapHanaRestoreWithRehydrateRequest(json); + } + case "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest": + { + return new AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest(json); + } + case "AzureWorkloadSQLRestoreWithRehydrateRequest": + { + return new AzureWorkloadSqlRestoreWithRehydrateRequest(json); + } + } + return new AzureWorkloadRestoreRequest(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __restoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._targetInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._targetInfo.ToJson(null,serializationMode) : null, "targetInfo" ,container.Add ); + AddIf( null != this._userAssignedManagedIdentityDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._userAssignedManagedIdentityDetail.ToJson(null,serializationMode) : null, "userAssignedManagedIdentityDetails" ,container.Add ); + AddIf( null != this._snapshotRestoreParameter ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._snapshotRestoreParameter.ToJson(null,serializationMode) : null, "snapshotRestoreParameters" ,container.Add ); + AddIf( null != (((object)this._recoveryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryType.ToString()) : null, "recoveryType" ,container.Add ); + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AddIf( null != this._propertyBag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._propertyBag.ToJson(null,serializationMode) : null, "propertyBag" ,container.Add ); + AddIf( null != (((object)this._recoveryMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryMode.ToString()) : null, "recoveryMode" ,container.Add ); + AddIf( null != (((object)this._targetResourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetResourceGroupName.ToString()) : null, "targetResourceGroupName" ,container.Add ); + AddIf( null != (((object)this._targetVirtualMachineId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetVirtualMachineId.ToString()) : null, "targetVirtualMachineId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequestPropertyBag.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequestPropertyBag.cs new file mode 100644 index 000000000000..a71e3dde2632 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequestPropertyBag.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Workload specific property bag. + public partial class AzureWorkloadRestoreRequestPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBagInternal + { + + /// Creates an new instance. + public AzureWorkloadRestoreRequestPropertyBag() + { + + } + } + /// Workload specific property bag. + public partial interface IAzureWorkloadRestoreRequestPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Workload specific property bag. + internal partial interface IAzureWorkloadRestoreRequestPropertyBagInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequestPropertyBag.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequestPropertyBag.dictionary.cs new file mode 100644 index 000000000000..b4881d8f3634 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequestPropertyBag.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class AzureWorkloadRestoreRequestPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequestPropertyBag source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequestPropertyBag.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequestPropertyBag.json.cs new file mode 100644 index 000000000000..ba0e666ed06e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadRestoreRequestPropertyBag.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Workload specific property bag. + public partial class AzureWorkloadRestoreRequestPropertyBag + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AzureWorkloadRestoreRequestPropertyBag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadRestoreRequestPropertyBag(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRecoveryPoint.cs new file mode 100644 index 000000000000..02ca83130820 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRecoveryPoint.cs @@ -0,0 +1,97 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point specific to PointInTime in SAPHana + public partial class AzureWorkloadSapHanaPointInTimeRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRecoveryPointInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPoint __azureWorkloadPointInTimeRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadPointInTimeRecoveryPoint(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).ObjectType = value ; } + + /// Eligibility of RP to be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointMoveReadinessInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointMoveReadinessInfo = value ?? null /* model class */; } + + /// Properties of Recovery Point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointProperty = value ?? null /* model class */; } + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyExpiryTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointPropertyExpiryTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointPropertyExpiryTime = value ?? null; } + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? RecoveryPointPropertyIsSoftDeleted { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointPropertyIsSoftDeleted; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointPropertyIsSoftDeleted = value ?? default(bool); } + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyRuleName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointPropertyRuleName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointPropertyRuleName = value ?? null; } + + /// Recovery point tier information. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointTierDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointTierDetail = value ?? null /* arrayOf */; } + + /// UTC time at which recovery point was created + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? RecoveryPointTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).RecoveryPointTimeInUtc = value ?? default(global::System.DateTime); } + + /// List of log ranges + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange[] TimeRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).TimeRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).TimeRange = value ?? null /* arrayOf */; } + + /// Type of restore point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadPointInTimeRecoveryPoint).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType)""); } + + /// + /// Creates an new instance. + /// + public AzureWorkloadSapHanaPointInTimeRecoveryPoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadPointInTimeRecoveryPoint), __azureWorkloadPointInTimeRecoveryPoint); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadPointInTimeRecoveryPoint), __azureWorkloadPointInTimeRecoveryPoint); + } + } + /// Recovery point specific to PointInTime in SAPHana + public partial interface IAzureWorkloadSapHanaPointInTimeRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPoint + { + + } + /// Recovery point specific to PointInTime in SAPHana + internal partial interface IAzureWorkloadSapHanaPointInTimeRecoveryPointInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadPointInTimeRecoveryPointInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRecoveryPoint.json.cs new file mode 100644 index 000000000000..6ca17417f750 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRecoveryPoint.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point specific to PointInTime in SAPHana + public partial class AzureWorkloadSapHanaPointInTimeRecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSapHanaPointInTimeRecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadPointInTimeRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadPointInTimeRecoveryPoint(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRecoveryPoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSapHanaPointInTimeRecoveryPoint(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadPointInTimeRecoveryPoint?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreRequest.cs new file mode 100644 index 000000000000..5edda942619f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreRequest.cs @@ -0,0 +1,173 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore + /// + public partial class AzureWorkloadSapHanaPointInTimeRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType = value ; } + + /// Backing field for property. + private global::System.DateTime? _pointInTime; + + /// PointInTime value + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? PointInTime { get => this._pointInTime; set => this._pointInTime = value; } + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag = value ?? null /* model class */; } + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode)""); } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount = value ?? default(bool); } + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId = value ?? null; } + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo = value ?? null /* model class */; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore = value ?? null; } + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName = value ?? null; } + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail = value ?? null /* model class */; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value ?? null /* model class */; } + + /// + /// Creates an new instance. + /// + public AzureWorkloadSapHanaPointInTimeRestoreRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + } + } + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore + public partial interface IAzureWorkloadSapHanaPointInTimeRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest + { + /// PointInTime value + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"PointInTime value", + SerializedName = @"pointInTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? PointInTime { get; set; } + + } + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore + internal partial interface IAzureWorkloadSapHanaPointInTimeRestoreRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal + { + /// PointInTime value + global::System.DateTime? PointInTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreRequest.json.cs new file mode 100644 index 000000000000..d9b320367c19 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreRequest.json.cs @@ -0,0 +1,131 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore + /// + public partial class AzureWorkloadSapHanaPointInTimeRestoreRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSapHanaPointInTimeRestoreRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(json); + {_pointInTime = If( json?.PropertyT("pointInTime"), out var __jsonPointInTime) ? global::System.DateTime.TryParse((string)__jsonPointInTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonPointInTimeValue) ? __jsonPointInTimeValue : PointInTime : PointInTime;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequest + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest": + { + return new AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest(json); + } + } + return new AzureWorkloadSapHanaPointInTimeRestoreRequest(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadRestoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._pointInTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._pointInTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "pointInTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..ee4a05f6489f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.cs @@ -0,0 +1,210 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + /// + public partial class AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequest __azureWorkloadSapHanaPointInTimeRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSapHanaPointInTimeRestoreRequest(); + + /// Internal Acessors for RecoveryPointRehydrationInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestInternal.RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set { {_recoveryPointRehydrationInfo = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).ObjectType = value ; } + + /// PointInTime value + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? PointInTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).PointInTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).PointInTime = value ?? default(global::System.DateTime); } + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).PropertyBag = value ?? null /* model class */; } + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).RecoveryMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).RecoveryMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo _recoveryPointRehydrationInfo; + + /// RP Rehydration Info + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set => this._recoveryPointRehydrationInfo = value; } + + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority)""); } + + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration = value ?? null; } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).SnapshotRestoreParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).SnapshotRestoreParameter = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount = value ?? default(bool); } + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).SourceResourceId = value ?? null; } + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfo = value ?? null /* model class */; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfoContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfoContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfoDatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfoOverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfoOverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfoTargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetInfoTargetDirectoryForFileRestore = value ?? null; } + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetResourceGroupName = value ?? null; } + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedManagedIdentityDetail = value ?? null /* model class */; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSapHanaPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value ?? null /* model class */; } + + /// + /// Creates an new instance. + /// + public AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadSapHanaPointInTimeRestoreRequest), __azureWorkloadSapHanaPointInTimeRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadSapHanaPointInTimeRestoreRequest), __azureWorkloadSapHanaPointInTimeRestoreRequest); + } + } + /// AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + public partial interface IAzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequest + { + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rehydration Priority", + SerializedName = @"rehydrationPriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. ""P7D""", + SerializedName = @"rehydrationRetentionDuration", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } + /// AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + internal partial interface IAzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreRequestInternal + { + /// RP Rehydration Info + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + /// Rehydration Priority + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.json.cs new file mode 100644 index 000000000000..341cf5566de9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.json.cs @@ -0,0 +1,115 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + /// + public partial class AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadSapHanaPointInTimeRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSapHanaPointInTimeRestoreRequest(json); + {_recoveryPointRehydrationInfo = If( json?.PropertyT("recoveryPointRehydrationInfo"), out var __jsonRecoveryPointRehydrationInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo.FromJson(__jsonRecoveryPointRehydrationInfo) : RecoveryPointRehydrationInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadSapHanaPointInTimeRestoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointRehydrationInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointRehydrationInfo.ToJson(null,serializationMode) : null, "recoveryPointRehydrationInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRecoveryPoint.cs new file mode 100644 index 000000000000..282920ebfbc9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRecoveryPoint.cs @@ -0,0 +1,93 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints + /// + public partial class AzureWorkloadSapHanaRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRecoveryPointInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint __azureWorkloadRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRecoveryPoint(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadRecoveryPoint).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadRecoveryPoint).ObjectType = value ; } + + /// Eligibility of RP to be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointMoveReadinessInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointMoveReadinessInfo = value ?? null /* model class */; } + + /// Properties of Recovery Point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointProperty = value ?? null /* model class */; } + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyExpiryTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyExpiryTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyExpiryTime = value ?? null; } + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? RecoveryPointPropertyIsSoftDeleted { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyIsSoftDeleted; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyIsSoftDeleted = value ?? default(bool); } + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyRuleName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyRuleName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyRuleName = value ?? null; } + + /// Recovery point tier information. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTierDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTierDetail = value ?? null /* arrayOf */; } + + /// UTC time at which recovery point was created + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? RecoveryPointTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTimeInUtc = value ?? default(global::System.DateTime); } + + /// Type of restore point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType)""); } + + /// Creates an new instance. + public AzureWorkloadSapHanaRecoveryPoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadRecoveryPoint), __azureWorkloadRecoveryPoint); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadRecoveryPoint), __azureWorkloadRecoveryPoint); + } + } + /// SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints + public partial interface IAzureWorkloadSapHanaRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint + { + + } + /// SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints + internal partial interface IAzureWorkloadSapHanaRecoveryPointInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRecoveryPoint.json.cs new file mode 100644 index 000000000000..ae771b958278 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRecoveryPoint.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints + /// + public partial class AzureWorkloadSapHanaRecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSapHanaRecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRecoveryPoint(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRecoveryPoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSapHanaRecoveryPoint(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadRecoveryPoint?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreRequest.cs new file mode 100644 index 000000000000..43e77889f5e0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreRequest.cs @@ -0,0 +1,152 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload SAP Hana-specific restore. + public partial class AzureWorkloadSapHanaRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType = value ; } + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag = value ?? null /* model class */; } + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode)""); } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount = value ?? default(bool); } + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId = value ?? null; } + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo = value ?? null /* model class */; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore = value ?? null; } + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName = value ?? null; } + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail = value ?? null /* model class */; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value ?? null /* model class */; } + + /// Creates an new instance. + public AzureWorkloadSapHanaRestoreRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + } + } + /// AzureWorkload SAP Hana-specific restore. + public partial interface IAzureWorkloadSapHanaRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest + { + + } + /// AzureWorkload SAP Hana-specific restore. + internal partial interface IAzureWorkloadSapHanaRestoreRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreRequest.json.cs new file mode 100644 index 000000000000..93b36f1cc10b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreRequest.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload SAP Hana-specific restore. + public partial class AzureWorkloadSapHanaRestoreRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSapHanaRestoreRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSapHanaRestoreRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadRestoreRequest?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreWithRehydrateRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..36cb3d66f172 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreWithRehydrateRequest.cs @@ -0,0 +1,206 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + /// + public partial class AzureWorkloadSapHanaRestoreWithRehydrateRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreWithRehydrateRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreWithRehydrateRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(); + + /// Internal Acessors for RecoveryPointRehydrationInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreWithRehydrateRequestInternal.RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set { {_recoveryPointRehydrationInfo = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType = value ; } + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag = value ?? null /* model class */; } + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo _recoveryPointRehydrationInfo; + + /// RP Rehydration Info + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set => this._recoveryPointRehydrationInfo = value; } + + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority)""); } + + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration = value ?? null; } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount = value ?? default(bool); } + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId = value ?? null; } + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo = value ?? null /* model class */; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore = value ?? null; } + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName = value ?? null; } + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail = value ?? null /* model class */; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value ?? null /* model class */; } + + /// + /// Creates an new instance. + /// + public AzureWorkloadSapHanaRestoreWithRehydrateRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + } + } + /// AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + public partial interface IAzureWorkloadSapHanaRestoreWithRehydrateRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest + { + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rehydration Priority", + SerializedName = @"rehydrationPriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. ""P7D""", + SerializedName = @"rehydrationRetentionDuration", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } + /// AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + internal partial interface IAzureWorkloadSapHanaRestoreWithRehydrateRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal + { + /// RP Rehydration Info + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + /// Rehydration Priority + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreWithRehydrateRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreWithRehydrateRequest.json.cs new file mode 100644 index 000000000000..cd5f91b7058f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSapHanaRestoreWithRehydrateRequest.json.cs @@ -0,0 +1,115 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + /// + public partial class AzureWorkloadSapHanaRestoreWithRehydrateRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSapHanaRestoreWithRehydrateRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(json); + {_recoveryPointRehydrationInfo = If( json?.PropertyT("recoveryPointRehydrationInfo"), out var __jsonRecoveryPointRehydrationInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo.FromJson(__jsonRecoveryPointRehydrationInfo) : RecoveryPointRehydrationInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreWithRehydrateRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreWithRehydrateRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSapHanaRestoreWithRehydrateRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSapHanaRestoreWithRehydrateRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadRestoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointRehydrationInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointRehydrationInfo.ToJson(null,serializationMode) : null, "recoveryPointRehydrationInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlAutoProtectionIntent.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlAutoProtectionIntent.cs new file mode 100644 index 000000000000..f80c94055144 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlAutoProtectionIntent.cs @@ -0,0 +1,96 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Workload SQL Auto Protection intent item. + public partial class AzureWorkloadSqlAutoProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlAutoProtectionIntent, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlAutoProtectionIntentInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureRecoveryServiceVaultProtectionIntent __azureRecoveryServiceVaultProtectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureRecoveryServiceVaultProtectionIntent(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ItemId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).ItemId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).ItemId = value ?? null; } + + /// backup protectionIntent type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType ItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).ItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).ItemType = value ; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).PolicyId = value ?? null; } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)__azureRecoveryServiceVaultProtectionIntent).SourceResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType? _workloadItemType; + + /// Workload item type of the item for which intent is to be set + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType? WorkloadItemType { get => this._workloadItemType; set => this._workloadItemType = value; } + + /// Creates an new instance. + public AzureWorkloadSqlAutoProtectionIntent() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureRecoveryServiceVaultProtectionIntent), __azureRecoveryServiceVaultProtectionIntent); + await eventListener.AssertObjectIsValid(nameof(__azureRecoveryServiceVaultProtectionIntent), __azureRecoveryServiceVaultProtectionIntent); + } + } + /// Azure Workload SQL Auto Protection intent item. + public partial interface IAzureWorkloadSqlAutoProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureRecoveryServiceVaultProtectionIntent + { + /// Workload item type of the item for which intent is to be set + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload item type of the item for which intent is to be set", + SerializedName = @"workloadItemType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType? WorkloadItemType { get; set; } + + } + /// Azure Workload SQL Auto Protection intent item. + internal partial interface IAzureWorkloadSqlAutoProtectionIntentInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureRecoveryServiceVaultProtectionIntentInternal + { + /// Workload item type of the item for which intent is to be set + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType? WorkloadItemType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlAutoProtectionIntent.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlAutoProtectionIntent.json.cs new file mode 100644 index 000000000000..c8b70b9dc63a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlAutoProtectionIntent.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Workload SQL Auto Protection intent item. + public partial class AzureWorkloadSqlAutoProtectionIntent + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSqlAutoProtectionIntent(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureRecoveryServiceVaultProtectionIntent = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureRecoveryServiceVaultProtectionIntent(json); + {_workloadItemType = If( json?.PropertyT("workloadItemType"), out var __jsonWorkloadItemType) ? (string)__jsonWorkloadItemType : (string)WorkloadItemType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlAutoProtectionIntent. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlAutoProtectionIntent. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlAutoProtectionIntent FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSqlAutoProtectionIntent(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureRecoveryServiceVaultProtectionIntent?.ToJson(container, serializationMode); + AddIf( null != (((object)this._workloadItemType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadItemType.ToString()) : null, "workloadItemType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRecoveryPoint.cs new file mode 100644 index 000000000000..1adabf8a7b05 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRecoveryPoint.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point specific to PointInTime + public partial class AzureWorkloadSqlPointInTimeRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRecoveryPointInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPoint __azureWorkloadSqlRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlRecoveryPoint(); + + /// + /// Extended Info that provides data directory details. Will be populated in two cases: + /// When a specific recovery point is accessed using GetRecoveryPoint + /// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).ExtendedInfo = value ?? null /* model class */; } + + /// List of data directory paths during restore operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] ExtendedInfoDataDirectoryPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).ExtendedInfoDataDirectoryPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).ExtendedInfoDataDirectoryPath = value ?? null /* arrayOf */; } + + /// UTC time at which data directory info was captured + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoDataDirectoryTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).ExtendedInfoDataDirectoryTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).ExtendedInfoDataDirectoryTimeInUtc = value ?? default(global::System.DateTime); } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).ObjectType = value ; } + + /// Eligibility of RP to be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointMoveReadinessInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointMoveReadinessInfo = value ?? null /* model class */; } + + /// Properties of Recovery Point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointProperty = value ?? null /* model class */; } + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyExpiryTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointPropertyExpiryTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointPropertyExpiryTime = value ?? null; } + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? RecoveryPointPropertyIsSoftDeleted { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointPropertyIsSoftDeleted; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointPropertyIsSoftDeleted = value ?? default(bool); } + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyRuleName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointPropertyRuleName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointPropertyRuleName = value ?? null; } + + /// Recovery point tier information. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointTierDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointTierDetail = value ?? null /* arrayOf */; } + + /// UTC time at which recovery point was created + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? RecoveryPointTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).RecoveryPointTimeInUtc = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange[] _timeRange; + + /// List of log ranges + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange[] TimeRange { get => this._timeRange; set => this._timeRange = value; } + + /// Type of restore point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadSqlRecoveryPoint).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType)""); } + + /// + /// Creates an new instance. + /// + public AzureWorkloadSqlPointInTimeRecoveryPoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadSqlRecoveryPoint), __azureWorkloadSqlRecoveryPoint); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadSqlRecoveryPoint), __azureWorkloadSqlRecoveryPoint); + } + } + /// Recovery point specific to PointInTime + public partial interface IAzureWorkloadSqlPointInTimeRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPoint + { + /// List of log ranges + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of log ranges", + SerializedName = @"timeRanges", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange[] TimeRange { get; set; } + + } + /// Recovery point specific to PointInTime + internal partial interface IAzureWorkloadSqlPointInTimeRecoveryPointInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointInternal + { + /// List of log ranges + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange[] TimeRange { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRecoveryPoint.json.cs new file mode 100644 index 000000000000..24eb8f0e87e4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRecoveryPoint.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point specific to PointInTime + public partial class AzureWorkloadSqlPointInTimeRecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSqlPointInTimeRecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadSqlRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlRecoveryPoint(json); + {_timeRange = If( json?.PropertyT("timeRanges"), out var __jsonTimeRanges) ? If( __jsonTimeRanges as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PointInTimeRange.FromJson(__u) )) ))() : null : TimeRange;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRecoveryPoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSqlPointInTimeRecoveryPoint(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadSqlRecoveryPoint?.ToJson(container, serializationMode); + if (null != this._timeRange) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._timeRange ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("timeRanges",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreRequest.cs new file mode 100644 index 000000000000..b1153802eaea --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreRequest.cs @@ -0,0 +1,187 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore + public partial class AzureWorkloadSqlPointInTimeRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequest __azureWorkloadSqlRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlRestoreRequest(); + + /// Data directory details + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping[] AlternateDirectoryPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).AlternateDirectoryPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).AlternateDirectoryPath = value ?? null /* arrayOf */; } + + /// + /// SQL specific property where user can chose to set no-recovery when restore operation is tried + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsNonRecoverable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).IsNonRecoverable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).IsNonRecoverable = value ?? default(bool); } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ObjectType = value ; } + + /// Backing field for property. + private global::System.DateTime? _pointInTime; + + /// PointInTime value + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? PointInTime { get => this._pointInTime; set => this._pointInTime = value; } + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).PropertyBag = value ?? null /* model class */; } + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).RecoveryMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).RecoveryMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode)""); } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// + /// Default option set to true. If this is set to false, alternate data directory must be provided + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? ShouldUseAlternateTargetLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ShouldUseAlternateTargetLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ShouldUseAlternateTargetLocation = value ?? default(bool); } + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameter = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount = value ?? default(bool); } + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SourceResourceId = value ?? null; } + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfo = value ?? null /* model class */; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoDatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoOverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoOverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoTargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoTargetDirectoryForFileRestore = value ?? null; } + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetResourceGroupName = value ?? null; } + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetail = value ?? null /* model class */; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value ?? null /* model class */; } + + /// + /// Creates an new instance. + /// + public AzureWorkloadSqlPointInTimeRestoreRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadSqlRestoreRequest), __azureWorkloadSqlRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadSqlRestoreRequest), __azureWorkloadSqlRestoreRequest); + } + } + /// AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore + public partial interface IAzureWorkloadSqlPointInTimeRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequest + { + /// PointInTime value + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"PointInTime value", + SerializedName = @"pointInTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? PointInTime { get; set; } + + } + /// AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore + internal partial interface IAzureWorkloadSqlPointInTimeRestoreRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal + { + /// PointInTime value + global::System.DateTime? PointInTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreRequest.json.cs new file mode 100644 index 000000000000..d6f12c37e410 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreRequest.json.cs @@ -0,0 +1,128 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore + public partial class AzureWorkloadSqlPointInTimeRestoreRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSqlPointInTimeRestoreRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadSqlRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlRestoreRequest(json); + {_pointInTime = If( json?.PropertyT("pointInTime"), out var __jsonPointInTime) ? global::System.DateTime.TryParse((string)__jsonPointInTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonPointInTimeValue) ? __jsonPointInTimeValue : PointInTime : PointInTime;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequest + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest": + { + return new AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest(json); + } + } + return new AzureWorkloadSqlPointInTimeRestoreRequest(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadSqlRestoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._pointInTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._pointInTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "pointInTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..2a03f7a5847a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.cs @@ -0,0 +1,226 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery point. + /// + public partial class AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequest __azureWorkloadSqlPointInTimeRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlPointInTimeRestoreRequest(); + + /// Data directory details + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping[] AlternateDirectoryPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).AlternateDirectoryPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).AlternateDirectoryPath = value ?? null /* arrayOf */; } + + /// + /// SQL specific property where user can chose to set no-recovery when restore operation is tried + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsNonRecoverable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).IsNonRecoverable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).IsNonRecoverable = value ?? default(bool); } + + /// Internal Acessors for RecoveryPointRehydrationInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestInternal.RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set { {_recoveryPointRehydrationInfo = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).ObjectType = value ; } + + /// PointInTime value + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? PointInTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).PointInTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).PointInTime = value ?? default(global::System.DateTime); } + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).PropertyBag = value ?? null /* model class */; } + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).RecoveryMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).RecoveryMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo _recoveryPointRehydrationInfo; + + /// RP Rehydration Info + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set => this._recoveryPointRehydrationInfo = value; } + + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority)""); } + + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration = value ?? null; } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// + /// Default option set to true. If this is set to false, alternate data directory must be provided + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? ShouldUseAlternateTargetLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).ShouldUseAlternateTargetLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).ShouldUseAlternateTargetLocation = value ?? default(bool); } + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).SnapshotRestoreParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).SnapshotRestoreParameter = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount = value ?? default(bool); } + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).SourceResourceId = value ?? null; } + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfo = value ?? null /* model class */; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfoContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfoContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfoDatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfoOverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfoOverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfoTargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetInfoTargetDirectoryForFileRestore = value ?? null; } + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetResourceGroupName = value ?? null; } + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedManagedIdentityDetail = value ?? null /* model class */; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlPointInTimeRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value ?? null /* model class */; } + + /// + /// Creates an new instance. + /// + public AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadSqlPointInTimeRestoreRequest), __azureWorkloadSqlPointInTimeRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadSqlPointInTimeRestoreRequest), __azureWorkloadSqlPointInTimeRestoreRequest); + } + } + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery point. + public partial interface IAzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequest + { + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rehydration Priority", + SerializedName = @"rehydrationPriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. ""P7D""", + SerializedName = @"rehydrationRetentionDuration", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery point. + internal partial interface IAzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreRequestInternal + { + /// RP Rehydration Info + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + /// Rehydration Priority + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.json.cs new file mode 100644 index 000000000000..665e91fb53ae --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.json.cs @@ -0,0 +1,115 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery point. + /// + public partial class AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadSqlPointInTimeRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlPointInTimeRestoreRequest(json); + {_recoveryPointRehydrationInfo = If( json?.PropertyT("recoveryPointRehydrationInfo"), out var __jsonRecoveryPointRehydrationInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo.FromJson(__jsonRecoveryPointRehydrationInfo) : RecoveryPointRehydrationInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadSqlPointInTimeRestoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointRehydrationInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointRehydrationInfo.ToJson(null,serializationMode) : null, "recoveryPointRehydrationInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPoint.cs new file mode 100644 index 000000000000..c8ac6220906f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPoint.cs @@ -0,0 +1,141 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with extended info + /// + public partial class AzureWorkloadSqlRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint __azureWorkloadRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRecoveryPoint(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfo _extendedInfo; + + /// + /// Extended Info that provides data directory details. Will be populated in two cases: + /// When a specific recovery point is accessed using GetRecoveryPoint + /// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlRecoveryPointExtendedInfo()); set => this._extendedInfo = value; } + + /// List of data directory paths during restore operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] ExtendedInfoDataDirectoryPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfoInternal)ExtendedInfo).DataDirectoryPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfoInternal)ExtendedInfo).DataDirectoryPath = value ?? null /* arrayOf */; } + + /// UTC time at which data directory info was captured + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoDataDirectoryTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfoInternal)ExtendedInfo).DataDirectoryTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfoInternal)ExtendedInfo).DataDirectoryTimeInUtc = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlRecoveryPointExtendedInfo()); set { {_extendedInfo = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadRecoveryPoint).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__azureWorkloadRecoveryPoint).ObjectType = value ; } + + /// Eligibility of RP to be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointMoveReadinessInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointMoveReadinessInfo = value ?? null /* model class */; } + + /// Properties of Recovery Point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointProperty = value ?? null /* model class */; } + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyExpiryTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyExpiryTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyExpiryTime = value ?? null; } + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? RecoveryPointPropertyIsSoftDeleted { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyIsSoftDeleted; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyIsSoftDeleted = value ?? default(bool); } + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointPropertyRuleName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyRuleName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointPropertyRuleName = value ?? null; } + + /// Recovery point tier information. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTierDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTierDetail = value ?? null /* arrayOf */; } + + /// UTC time at which recovery point was created + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? RecoveryPointTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).RecoveryPointTimeInUtc = value ?? default(global::System.DateTime); } + + /// Type of restore point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal)__azureWorkloadRecoveryPoint).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType)""); } + + /// Creates an new instance. + public AzureWorkloadSqlRecoveryPoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadRecoveryPoint), __azureWorkloadRecoveryPoint); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadRecoveryPoint), __azureWorkloadRecoveryPoint); + } + } + /// SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with extended info + public partial interface IAzureWorkloadSqlRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPoint + { + /// List of data directory paths during restore operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of data directory paths during restore operation.", + SerializedName = @"dataDirectoryPaths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] ExtendedInfoDataDirectoryPath { get; set; } + /// UTC time at which data directory info was captured + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"UTC time at which data directory info was captured", + SerializedName = @"dataDirectoryTimeInUTC", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoDataDirectoryTimeInUtc { get; set; } + + } + /// SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with extended info + internal partial interface IAzureWorkloadSqlRecoveryPointInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRecoveryPointInternal + { + /// + /// Extended Info that provides data directory details. Will be populated in two cases: + /// When a specific recovery point is accessed using GetRecoveryPoint + /// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfo ExtendedInfo { get; set; } + /// List of data directory paths during restore operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] ExtendedInfoDataDirectoryPath { get; set; } + /// UTC time at which data directory info was captured + global::System.DateTime? ExtendedInfoDataDirectoryTimeInUtc { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPoint.json.cs new file mode 100644 index 000000000000..734b571399c0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPoint.json.cs @@ -0,0 +1,128 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with extended info + /// + public partial class AzureWorkloadSqlRecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSqlRecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadRecoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRecoveryPoint(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlRecoveryPointExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPoint. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPoint + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureWorkloadSQLPointInTimeRecoveryPoint": + { + return new AzureWorkloadSqlPointInTimeRecoveryPoint(json); + } + } + return new AzureWorkloadSqlRecoveryPoint(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadRecoveryPoint?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPointExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPointExtendedInfo.cs new file mode 100644 index 000000000000..5706a3af72de --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPointExtendedInfo.cs @@ -0,0 +1,70 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Extended info class details + public partial class AzureWorkloadSqlRecoveryPointExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] _dataDirectoryPath; + + /// List of data directory paths during restore operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] DataDirectoryPath { get => this._dataDirectoryPath; set => this._dataDirectoryPath = value; } + + /// Backing field for property. + private global::System.DateTime? _dataDirectoryTimeInUtc; + + /// UTC time at which data directory info was captured + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? DataDirectoryTimeInUtc { get => this._dataDirectoryTimeInUtc; set => this._dataDirectoryTimeInUtc = value; } + + /// + /// Creates an new instance. + /// + public AzureWorkloadSqlRecoveryPointExtendedInfo() + { + + } + } + /// Extended info class details + public partial interface IAzureWorkloadSqlRecoveryPointExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of data directory paths during restore operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of data directory paths during restore operation.", + SerializedName = @"dataDirectoryPaths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] DataDirectoryPath { get; set; } + /// UTC time at which data directory info was captured + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"UTC time at which data directory info was captured", + SerializedName = @"dataDirectoryTimeInUTC", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DataDirectoryTimeInUtc { get; set; } + + } + /// Extended info class details + internal partial interface IAzureWorkloadSqlRecoveryPointExtendedInfoInternal + + { + /// List of data directory paths during restore operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory[] DataDirectoryPath { get; set; } + /// UTC time at which data directory info was captured + global::System.DateTime? DataDirectoryTimeInUtc { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPointExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPointExtendedInfo.json.cs new file mode 100644 index 000000000000..4c6265bb94ac --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRecoveryPointExtendedInfo.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Extended info class details + public partial class AzureWorkloadSqlRecoveryPointExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSqlRecoveryPointExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dataDirectoryTimeInUtc = If( json?.PropertyT("dataDirectoryTimeInUTC"), out var __jsonDataDirectoryTimeInUtc) ? global::System.DateTime.TryParse((string)__jsonDataDirectoryTimeInUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDataDirectoryTimeInUtcValue) ? __jsonDataDirectoryTimeInUtcValue : DataDirectoryTimeInUtc : DataDirectoryTimeInUtc;} + {_dataDirectoryPath = If( json?.PropertyT("dataDirectoryPaths"), out var __jsonDataDirectoryPaths) ? If( __jsonDataDirectoryPaths as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SqlDataDirectory.FromJson(__u) )) ))() : null : DataDirectoryPath;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRecoveryPointExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSqlRecoveryPointExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dataDirectoryTimeInUtc ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dataDirectoryTimeInUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dataDirectoryTimeInUTC" ,container.Add ); + if (null != this._dataDirectoryPath) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._dataDirectoryPath ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("dataDirectoryPaths",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreRequest.cs new file mode 100644 index 000000000000..6799e6dc0abb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreRequest.cs @@ -0,0 +1,215 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload SQL -specific restore. Specifically for full/diff restore + public partial class AzureWorkloadSqlRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping[] _alternateDirectoryPath; + + /// Data directory details + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping[] AlternateDirectoryPath { get => this._alternateDirectoryPath; set => this._alternateDirectoryPath = value; } + + /// Backing field for property. + private bool? _isNonRecoverable; + + /// + /// SQL specific property where user can chose to set no-recovery when restore operation is tried + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsNonRecoverable { get => this._isNonRecoverable; set => this._isNonRecoverable = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ObjectType = value ; } + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).PropertyBag = value ?? null /* model class */; } + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode)""); } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private bool? _shouldUseAlternateTargetLocation; + + /// + /// Default option set to true. If this is set to false, alternate data directory must be provided + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? ShouldUseAlternateTargetLocation { get => this._shouldUseAlternateTargetLocation; set => this._shouldUseAlternateTargetLocation = value; } + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameter = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount = value ?? default(bool); } + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).SourceResourceId = value ?? null; } + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfo = value ?? null /* model class */; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoDatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoOverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetInfoTargetDirectoryForFileRestore = value ?? null; } + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetResourceGroupName = value ?? null; } + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetail = value ?? null /* model class */; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value ?? null /* model class */; } + + /// Creates an new instance. + public AzureWorkloadSqlRestoreRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadRestoreRequest), __azureWorkloadRestoreRequest); + } + } + /// AzureWorkload SQL -specific restore. Specifically for full/diff restore + public partial interface IAzureWorkloadSqlRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequest + { + /// Data directory details + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Data directory details", + SerializedName = @"alternateDirectoryPaths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping[] AlternateDirectoryPath { get; set; } + /// + /// SQL specific property where user can chose to set no-recovery when restore operation is tried + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SQL specific property where user can chose to set no-recovery when restore operation is tried", + SerializedName = @"isNonRecoverable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsNonRecoverable { get; set; } + /// + /// Default option set to true. If this is set to false, alternate data directory must be provided + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Default option set to true. If this is set to false, alternate data directory must be provided", + SerializedName = @"shouldUseAlternateTargetLocation", + PossibleTypes = new [] { typeof(bool) })] + bool? ShouldUseAlternateTargetLocation { get; set; } + + } + /// AzureWorkload SQL -specific restore. Specifically for full/diff restore + internal partial interface IAzureWorkloadSqlRestoreRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal + { + /// Data directory details + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping[] AlternateDirectoryPath { get; set; } + /// + /// SQL specific property where user can chose to set no-recovery when restore operation is tried + /// + bool? IsNonRecoverable { get; set; } + /// + /// Default option set to true. If this is set to false, alternate data directory must be provided + /// + bool? ShouldUseAlternateTargetLocation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreRequest.json.cs new file mode 100644 index 000000000000..54aa9d9c6084 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreRequest.json.cs @@ -0,0 +1,146 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureWorkload SQL -specific restore. Specifically for full/diff restore + public partial class AzureWorkloadSqlRestoreRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSqlRestoreRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadRestoreRequest(json); + {_shouldUseAlternateTargetLocation = If( json?.PropertyT("shouldUseAlternateTargetLocation"), out var __jsonShouldUseAlternateTargetLocation) ? (bool?)__jsonShouldUseAlternateTargetLocation : ShouldUseAlternateTargetLocation;} + {_isNonRecoverable = If( json?.PropertyT("isNonRecoverable"), out var __jsonIsNonRecoverable) ? (bool?)__jsonIsNonRecoverable : IsNonRecoverable;} + {_alternateDirectoryPath = If( json?.PropertyT("alternateDirectoryPaths"), out var __jsonAlternateDirectoryPaths) ? If( __jsonAlternateDirectoryPaths as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SqlDataDirectoryMapping.FromJson(__u) )) ))() : null : AlternateDirectoryPath;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequest + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureWorkloadSQLPointInTimeRestoreRequest": + { + return new AzureWorkloadSqlPointInTimeRestoreRequest(json); + } + case "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest": + { + return new AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest(json); + } + case "AzureWorkloadSQLRestoreWithRehydrateRequest": + { + return new AzureWorkloadSqlRestoreWithRehydrateRequest(json); + } + } + return new AzureWorkloadSqlRestoreRequest(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadRestoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._shouldUseAlternateTargetLocation ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._shouldUseAlternateTargetLocation) : null, "shouldUseAlternateTargetLocation" ,container.Add ); + AddIf( null != this._isNonRecoverable ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isNonRecoverable) : null, "isNonRecoverable" ,container.Add ); + if (null != this._alternateDirectoryPath) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._alternateDirectoryPath ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("alternateDirectoryPaths",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreWithRehydrateRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..13b5e43b4ac9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreWithRehydrateRequest.cs @@ -0,0 +1,222 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery point + /// + public partial class AzureWorkloadSqlRestoreWithRehydrateRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreWithRehydrateRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreWithRehydrateRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequest __azureWorkloadSqlRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlRestoreRequest(); + + /// Data directory details + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping[] AlternateDirectoryPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).AlternateDirectoryPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).AlternateDirectoryPath = value ?? null /* arrayOf */; } + + /// + /// SQL specific property where user can chose to set no-recovery when restore operation is tried + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsNonRecoverable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).IsNonRecoverable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).IsNonRecoverable = value ?? default(bool); } + + /// Internal Acessors for RecoveryPointRehydrationInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreWithRehydrateRequestInternal.RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set { {_recoveryPointRehydrationInfo = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ObjectType = value ; } + + /// Workload specific property bag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestPropertyBag PropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).PropertyBag = value ?? null /* model class */; } + + /// Defines whether the current recovery mode is file restore or database restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode? RecoveryMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).RecoveryMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).RecoveryMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo _recoveryPointRehydrationInfo; + + /// RP Rehydration Info + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set => this._recoveryPointRehydrationInfo = value; } + + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority)""); } + + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration = value ?? null; } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// + /// Default option set to true. If this is set to false, alternate data directory must be provided + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? ShouldUseAlternateTargetLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ShouldUseAlternateTargetLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).ShouldUseAlternateTargetLocation = value ?? default(bool); } + + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters SnapshotRestoreParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameter = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SnapshotRestoreParameterLogPointInTimeForDbRecovery { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameterLogPointInTimeForDbRecovery = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? SnapshotRestoreParameterSkipAttachAndMount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SnapshotRestoreParameterSkipAttachAndMount = value ?? default(bool); } + + /// + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).SourceResourceId = value ?? null; } + + /// Details of target database + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo TargetInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfo = value ?? null /* model class */; } + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoContainerId = value ?? null; } + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoDatabaseName = value ?? null; } + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? TargetInfoOverwriteOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoOverwriteOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoOverwriteOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions)""); } + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetInfoTargetDirectoryForFileRestore { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoTargetDirectoryForFileRestore; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetInfoTargetDirectoryForFileRestore = value ?? null; } + + /// Defines the Resource group of the Target VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetResourceGroupName = value ?? null; } + + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetail = value ?? null /* model class */; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadRestoreRequestInternal)__azureWorkloadSqlRestoreRequest).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value ?? null /* model class */; } + + /// + /// Creates an new instance. + /// + public AzureWorkloadSqlRestoreWithRehydrateRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureWorkloadSqlRestoreRequest), __azureWorkloadSqlRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__azureWorkloadSqlRestoreRequest), __azureWorkloadSqlRestoreRequest); + } + } + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery point + public partial interface IAzureWorkloadSqlRestoreWithRehydrateRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequest + { + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rehydration Priority", + SerializedName = @"rehydrationPriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. ""P7D""", + SerializedName = @"rehydrationRetentionDuration", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery point + internal partial interface IAzureWorkloadSqlRestoreWithRehydrateRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreRequestInternal + { + /// RP Rehydration Info + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + /// Rehydration Priority + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreWithRehydrateRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreWithRehydrateRequest.json.cs new file mode 100644 index 000000000000..2bbd818171f7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/AzureWorkloadSqlRestoreWithRehydrateRequest.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery point + /// + public partial class AzureWorkloadSqlRestoreWithRehydrateRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal AzureWorkloadSqlRestoreWithRehydrateRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __azureWorkloadSqlRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureWorkloadSqlRestoreRequest(json); + {_recoveryPointRehydrationInfo = If( json?.PropertyT("recoveryPointRehydrationInfo"), out var __jsonRecoveryPointRehydrationInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo.FromJson(__jsonRecoveryPointRehydrationInfo) : RecoveryPointRehydrationInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreWithRehydrateRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreWithRehydrateRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IAzureWorkloadSqlRestoreWithRehydrateRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new AzureWorkloadSqlRestoreWithRehydrateRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __azureWorkloadSqlRestoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointRehydrationInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointRehydrationInfo.ToJson(null,serializationMode) : null, "recoveryPointRehydrationInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBase.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBase.cs new file mode 100644 index 000000000000..68dcda3a29f1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBase.cs @@ -0,0 +1,370 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// The base backup engine class. All workload specific backup engines derive from this class. + /// + public partial class BackupEngineBase : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal + { + + /// Backing field for property. + private string _azureBackupAgentVersion; + + /// Backup agent version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AzureBackupAgentVersion { get => this._azureBackupAgentVersion; set => this._azureBackupAgentVersion = value; } + + /// Backing field for property. + private string _backupEngineId; + + /// ID of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupEngineId { get => this._backupEngineId; set => this._backupEngineId = value; } + + /// Backing field for property. + private string _backupEngineState; + + /// + /// Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupEngineState { get => this._backupEngineState; set => this._backupEngineState = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType _backupEngineType; + + /// Type of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType BackupEngineType { get => this._backupEngineType; set => this._backupEngineType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Type of backup management for the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private bool? _canReRegister; + + /// Flag indicating if the backup engine be registered, once already registered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? CanReRegister { get => this._canReRegister; set => this._canReRegister = value; } + + /// Backing field for property. + private string _dpmVersion; + + /// Backup engine version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DpmVersion { get => this._dpmVersion; set => this._dpmVersion = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo _extendedInfo; + + /// Extended info of the backupengine + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineExtendedInfo()); set => this._extendedInfo = value; } + + /// Disk space currently available in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public double? ExtendedInfoAvailableDiskSpace { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).AvailableDiskSpace; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).AvailableDiskSpace = value ?? default(double); } + + /// Protected instances in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoAzureProtectedInstance { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).AzureProtectedInstance; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).AzureProtectedInstance = value ?? default(int); } + + /// Database name of backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).DatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).DatabaseName = value ?? null; } + + /// Number of disks in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoDiskCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).DiskCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).DiskCount = value ?? default(int); } + + /// Number of protected items in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).ProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).ProtectedItemsCount = value ?? default(int); } + + /// Number of protected servers in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoProtectedServersCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).ProtectedServersCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).ProtectedServersCount = value ?? default(int); } + + /// Last refresh time in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoRefreshedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).RefreshedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).RefreshedAt = value ?? default(global::System.DateTime); } + + /// Disk space used in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public double? ExtendedInfoUsedDiskSpace { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).UsedDiskSpace; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal)ExtendedInfo).UsedDiskSpace = value ?? default(double); } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Backing field for property. + private string _healthStatus; + + /// Backup status of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string HealthStatus { get => this._healthStatus; set => this._healthStatus = value; } + + /// Backing field for property. + private bool? _isAzureBackupAgentUpgradeAvailable; + + /// To check if backup agent upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsAzureBackupAgentUpgradeAvailable { get => this._isAzureBackupAgentUpgradeAvailable; set => this._isAzureBackupAgentUpgradeAvailable = value; } + + /// Backing field for property. + private bool? _isDpmUpgradeAvailable; + + /// To check if backup engine upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsDpmUpgradeAvailable { get => this._isDpmUpgradeAvailable; set => this._isDpmUpgradeAvailable = value; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Backing field for property. + private string _registrationStatus; + + /// Registration status of the backup engine with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RegistrationStatus { get => this._registrationStatus; set => this._registrationStatus = value; } + + /// Creates an new instance. + public BackupEngineBase() + { + + } + } + /// The base backup engine class. All workload specific backup engines derive from this class. + public partial interface IBackupEngineBase : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup agent version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup agent version", + SerializedName = @"azureBackupAgentVersion", + PossibleTypes = new [] { typeof(string) })] + string AzureBackupAgentVersion { get; set; } + /// ID of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the backup engine.", + SerializedName = @"backupEngineId", + PossibleTypes = new [] { typeof(string) })] + string BackupEngineId { get; set; } + /// + /// Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}", + SerializedName = @"backupEngineState", + PossibleTypes = new [] { typeof(string) })] + string BackupEngineState { get; set; } + /// Type of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Type of the backup engine.", + SerializedName = @"backupEngineType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType BackupEngineType { get; set; } + /// Type of backup management for the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management for the backup engine.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Flag indicating if the backup engine be registered, once already registered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag indicating if the backup engine be registered, once already registered.", + SerializedName = @"canReRegister", + PossibleTypes = new [] { typeof(bool) })] + bool? CanReRegister { get; set; } + /// Backup engine version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup engine version", + SerializedName = @"dpmVersion", + PossibleTypes = new [] { typeof(string) })] + string DpmVersion { get; set; } + /// Disk space currently available in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Disk space currently available in the backup engine.", + SerializedName = @"availableDiskSpace", + PossibleTypes = new [] { typeof(double) })] + double? ExtendedInfoAvailableDiskSpace { get; set; } + /// Protected instances in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protected instances in the backup engine.", + SerializedName = @"azureProtectedInstances", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoAzureProtectedInstance { get; set; } + /// Database name of backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Database name of backup engine.", + SerializedName = @"databaseName", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoDatabaseName { get; set; } + /// Number of disks in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of disks in the backup engine.", + SerializedName = @"diskCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoDiskCount { get; set; } + /// Number of protected items in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of protected items in the backup engine.", + SerializedName = @"protectedItemsCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoProtectedItemsCount { get; set; } + /// Number of protected servers in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of protected servers in the backup engine.", + SerializedName = @"protectedServersCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoProtectedServersCount { get; set; } + /// Last refresh time in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last refresh time in the backup engine.", + SerializedName = @"refreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoRefreshedAt { get; set; } + /// Disk space used in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Disk space used in the backup engine.", + SerializedName = @"usedDiskSpace", + PossibleTypes = new [] { typeof(double) })] + double? ExtendedInfoUsedDiskSpace { get; set; } + /// Friendly name of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the backup engine.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Backup status of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup status of the backup engine.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(string) })] + string HealthStatus { get; set; } + /// To check if backup agent upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup agent upgrade available", + SerializedName = @"isAzureBackupAgentUpgradeAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAzureBackupAgentUpgradeAvailable { get; set; } + /// To check if backup engine upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup engine upgrade available", + SerializedName = @"isDpmUpgradeAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDpmUpgradeAvailable { get; set; } + /// Registration status of the backup engine with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Registration status of the backup engine with the Recovery Services Vault.", + SerializedName = @"registrationStatus", + PossibleTypes = new [] { typeof(string) })] + string RegistrationStatus { get; set; } + + } + /// The base backup engine class. All workload specific backup engines derive from this class. + internal partial interface IBackupEngineBaseInternal + + { + /// Backup agent version + string AzureBackupAgentVersion { get; set; } + /// ID of the backup engine. + string BackupEngineId { get; set; } + /// + /// Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + /// + string BackupEngineState { get; set; } + /// Type of the backup engine. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType BackupEngineType { get; set; } + /// Type of backup management for the backup engine. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Flag indicating if the backup engine be registered, once already registered. + bool? CanReRegister { get; set; } + /// Backup engine version + string DpmVersion { get; set; } + /// Extended info of the backupengine + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo ExtendedInfo { get; set; } + /// Disk space currently available in the backup engine. + double? ExtendedInfoAvailableDiskSpace { get; set; } + /// Protected instances in the backup engine. + int? ExtendedInfoAzureProtectedInstance { get; set; } + /// Database name of backup engine. + string ExtendedInfoDatabaseName { get; set; } + /// Number of disks in the backup engine. + int? ExtendedInfoDiskCount { get; set; } + /// Number of protected items in the backup engine. + int? ExtendedInfoProtectedItemsCount { get; set; } + /// Number of protected servers in the backup engine. + int? ExtendedInfoProtectedServersCount { get; set; } + /// Last refresh time in the backup engine. + global::System.DateTime? ExtendedInfoRefreshedAt { get; set; } + /// Disk space used in the backup engine. + double? ExtendedInfoUsedDiskSpace { get; set; } + /// Friendly name of the backup engine. + string FriendlyName { get; set; } + /// Backup status of the backup engine. + string HealthStatus { get; set; } + /// To check if backup agent upgrade available + bool? IsAzureBackupAgentUpgradeAvailable { get; set; } + /// To check if backup engine upgrade available + bool? IsDpmUpgradeAvailable { get; set; } + /// Registration status of the backup engine with the Recovery Services Vault. + string RegistrationStatus { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBase.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBase.json.cs new file mode 100644 index 000000000000..747e261386d4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBase.json.cs @@ -0,0 +1,153 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// The base backup engine class. All workload specific backup engines derive from this class. + /// + public partial class BackupEngineBase + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupEngineBase(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_registrationStatus = If( json?.PropertyT("registrationStatus"), out var __jsonRegistrationStatus) ? (string)__jsonRegistrationStatus : (string)RegistrationStatus;} + {_backupEngineState = If( json?.PropertyT("backupEngineState"), out var __jsonBackupEngineState) ? (string)__jsonBackupEngineState : (string)BackupEngineState;} + {_healthStatus = If( json?.PropertyT("healthStatus"), out var __jsonHealthStatus) ? (string)__jsonHealthStatus : (string)HealthStatus;} + {_backupEngineType = If( json?.PropertyT("backupEngineType"), out var __jsonBackupEngineType) ? (string)__jsonBackupEngineType : (string)BackupEngineType;} + {_canReRegister = If( json?.PropertyT("canReRegister"), out var __jsonCanReRegister) ? (bool?)__jsonCanReRegister : CanReRegister;} + {_backupEngineId = If( json?.PropertyT("backupEngineId"), out var __jsonBackupEngineId) ? (string)__jsonBackupEngineId : (string)BackupEngineId;} + {_dpmVersion = If( json?.PropertyT("dpmVersion"), out var __jsonDpmVersion) ? (string)__jsonDpmVersion : (string)DpmVersion;} + {_azureBackupAgentVersion = If( json?.PropertyT("azureBackupAgentVersion"), out var __jsonAzureBackupAgentVersion) ? (string)__jsonAzureBackupAgentVersion : (string)AzureBackupAgentVersion;} + {_isAzureBackupAgentUpgradeAvailable = If( json?.PropertyT("isAzureBackupAgentUpgradeAvailable"), out var __jsonIsAzureBackupAgentUpgradeAvailable) ? (bool?)__jsonIsAzureBackupAgentUpgradeAvailable : IsAzureBackupAgentUpgradeAvailable;} + {_isDpmUpgradeAvailable = If( json?.PropertyT("isDpmUpgradeAvailable"), out var __jsonIsDpmUpgradeAvailable) ? (bool?)__jsonIsDpmUpgradeAvailable : IsDpmUpgradeAvailable;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase interface is + /// polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("backupEngineType") ) + { + case "AzureBackupServerEngine": + { + return new AzureBackupServerEngine(json); + } + case "DpmBackupEngine": + { + return new DpmBackupEngine(json); + } + } + return new BackupEngineBase(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._registrationStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._registrationStatus.ToString()) : null, "registrationStatus" ,container.Add ); + AddIf( null != (((object)this._backupEngineState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupEngineState.ToString()) : null, "backupEngineState" ,container.Add ); + AddIf( null != (((object)this._healthStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._healthStatus.ToString()) : null, "healthStatus" ,container.Add ); + AddIf( null != (((object)this._backupEngineType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupEngineType.ToString()) : null, "backupEngineType" ,container.Add ); + AddIf( null != this._canReRegister ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._canReRegister) : null, "canReRegister" ,container.Add ); + AddIf( null != (((object)this._backupEngineId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupEngineId.ToString()) : null, "backupEngineId" ,container.Add ); + AddIf( null != (((object)this._dpmVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dpmVersion.ToString()) : null, "dpmVersion" ,container.Add ); + AddIf( null != (((object)this._azureBackupAgentVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._azureBackupAgentVersion.ToString()) : null, "azureBackupAgentVersion" ,container.Add ); + AddIf( null != this._isAzureBackupAgentUpgradeAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isAzureBackupAgentUpgradeAvailable) : null, "isAzureBackupAgentUpgradeAvailable" ,container.Add ); + AddIf( null != this._isDpmUpgradeAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isDpmUpgradeAvailable) : null, "isDpmUpgradeAvailable" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResource.cs new file mode 100644 index 000000000000..8dbde4026bbd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResource.cs @@ -0,0 +1,393 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// The base backup engine class. All workload specific backup engines derive from this class. + /// + public partial class BackupEngineBaseResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Backup agent version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string AzureBackupAgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).AzureBackupAgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).AzureBackupAgentVersion = value ?? null; } + + /// ID of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BackupEngineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).BackupEngineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).BackupEngineId = value ?? null; } + + /// + /// Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BackupEngineState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).BackupEngineState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).BackupEngineState = value ?? null; } + + /// Type of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType? BackupEngineType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).BackupEngineType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).BackupEngineType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType)""); } + + /// Type of backup management for the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Flag indicating if the backup engine be registered, once already registered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? CanReRegister { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).CanReRegister; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).CanReRegister = value ?? default(bool); } + + /// Backup engine version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string DpmVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).DpmVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).DpmVersion = value ?? null; } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Disk space currently available in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public double? ExtendedInfoAvailableDiskSpace { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoAvailableDiskSpace; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoAvailableDiskSpace = value ?? default(double); } + + /// Protected instances in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoAzureProtectedInstance { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoAzureProtectedInstance; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoAzureProtectedInstance = value ?? default(int); } + + /// Database name of backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoDatabaseName = value ?? null; } + + /// Number of disks in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoDiskCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoDiskCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoDiskCount = value ?? default(int); } + + /// Number of protected items in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoProtectedItemsCount = value ?? default(int); } + + /// Number of protected servers in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoProtectedServersCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoProtectedServersCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoProtectedServersCount = value ?? default(int); } + + /// Last refresh time in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoRefreshedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoRefreshedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoRefreshedAt = value ?? default(global::System.DateTime); } + + /// Disk space used in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public double? ExtendedInfoUsedDiskSpace { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoUsedDiskSpace; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfoUsedDiskSpace = value ?? default(double); } + + /// Friendly name of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).FriendlyName = value ?? null; } + + /// Backup status of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).HealthStatus = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// To check if backup agent upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? IsAzureBackupAgentUpgradeAvailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).IsAzureBackupAgentUpgradeAvailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).IsAzureBackupAgentUpgradeAvailable = value ?? default(bool); } + + /// To check if backup engine upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? IsDpmUpgradeAvailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).IsDpmUpgradeAvailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).IsDpmUpgradeAvailable = value ?? default(bool); } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResourceInternal.ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).ExtendedInfo = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBase()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase _property; + + /// BackupEngineBaseResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBase()); set => this._property = value; } + + /// Registration status of the backup engine with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)Property).RegistrationStatus = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public BackupEngineBaseResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The base backup engine class. All workload specific backup engines derive from this class. + public partial interface IBackupEngineBaseResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Backup agent version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup agent version", + SerializedName = @"azureBackupAgentVersion", + PossibleTypes = new [] { typeof(string) })] + string AzureBackupAgentVersion { get; set; } + /// ID of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the backup engine.", + SerializedName = @"backupEngineId", + PossibleTypes = new [] { typeof(string) })] + string BackupEngineId { get; set; } + /// + /// Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}", + SerializedName = @"backupEngineState", + PossibleTypes = new [] { typeof(string) })] + string BackupEngineState { get; set; } + /// Type of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the backup engine.", + SerializedName = @"backupEngineType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType? BackupEngineType { get; set; } + /// Type of backup management for the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management for the backup engine.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Flag indicating if the backup engine be registered, once already registered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag indicating if the backup engine be registered, once already registered.", + SerializedName = @"canReRegister", + PossibleTypes = new [] { typeof(bool) })] + bool? CanReRegister { get; set; } + /// Backup engine version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup engine version", + SerializedName = @"dpmVersion", + PossibleTypes = new [] { typeof(string) })] + string DpmVersion { get; set; } + /// Disk space currently available in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Disk space currently available in the backup engine.", + SerializedName = @"availableDiskSpace", + PossibleTypes = new [] { typeof(double) })] + double? ExtendedInfoAvailableDiskSpace { get; set; } + /// Protected instances in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protected instances in the backup engine.", + SerializedName = @"azureProtectedInstances", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoAzureProtectedInstance { get; set; } + /// Database name of backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Database name of backup engine.", + SerializedName = @"databaseName", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoDatabaseName { get; set; } + /// Number of disks in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of disks in the backup engine.", + SerializedName = @"diskCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoDiskCount { get; set; } + /// Number of protected items in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of protected items in the backup engine.", + SerializedName = @"protectedItemsCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoProtectedItemsCount { get; set; } + /// Number of protected servers in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of protected servers in the backup engine.", + SerializedName = @"protectedServersCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoProtectedServersCount { get; set; } + /// Last refresh time in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last refresh time in the backup engine.", + SerializedName = @"refreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoRefreshedAt { get; set; } + /// Disk space used in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Disk space used in the backup engine.", + SerializedName = @"usedDiskSpace", + PossibleTypes = new [] { typeof(double) })] + double? ExtendedInfoUsedDiskSpace { get; set; } + /// Friendly name of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the backup engine.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Backup status of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup status of the backup engine.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(string) })] + string HealthStatus { get; set; } + /// To check if backup agent upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup agent upgrade available", + SerializedName = @"isAzureBackupAgentUpgradeAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAzureBackupAgentUpgradeAvailable { get; set; } + /// To check if backup engine upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup engine upgrade available", + SerializedName = @"isDpmUpgradeAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDpmUpgradeAvailable { get; set; } + /// Registration status of the backup engine with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Registration status of the backup engine with the Recovery Services Vault.", + SerializedName = @"registrationStatus", + PossibleTypes = new [] { typeof(string) })] + string RegistrationStatus { get; set; } + + } + /// The base backup engine class. All workload specific backup engines derive from this class. + internal partial interface IBackupEngineBaseResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Backup agent version + string AzureBackupAgentVersion { get; set; } + /// ID of the backup engine. + string BackupEngineId { get; set; } + /// + /// Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + /// + string BackupEngineState { get; set; } + /// Type of the backup engine. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType? BackupEngineType { get; set; } + /// Type of backup management for the backup engine. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Flag indicating if the backup engine be registered, once already registered. + bool? CanReRegister { get; set; } + /// Backup engine version + string DpmVersion { get; set; } + /// Extended info of the backupengine + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo ExtendedInfo { get; set; } + /// Disk space currently available in the backup engine. + double? ExtendedInfoAvailableDiskSpace { get; set; } + /// Protected instances in the backup engine. + int? ExtendedInfoAzureProtectedInstance { get; set; } + /// Database name of backup engine. + string ExtendedInfoDatabaseName { get; set; } + /// Number of disks in the backup engine. + int? ExtendedInfoDiskCount { get; set; } + /// Number of protected items in the backup engine. + int? ExtendedInfoProtectedItemsCount { get; set; } + /// Number of protected servers in the backup engine. + int? ExtendedInfoProtectedServersCount { get; set; } + /// Last refresh time in the backup engine. + global::System.DateTime? ExtendedInfoRefreshedAt { get; set; } + /// Disk space used in the backup engine. + double? ExtendedInfoUsedDiskSpace { get; set; } + /// Friendly name of the backup engine. + string FriendlyName { get; set; } + /// Backup status of the backup engine. + string HealthStatus { get; set; } + /// To check if backup agent upgrade available + bool? IsAzureBackupAgentUpgradeAvailable { get; set; } + /// To check if backup engine upgrade available + bool? IsDpmUpgradeAvailable { get; set; } + /// BackupEngineBaseResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase Property { get; set; } + /// Registration status of the backup engine with the Recovery Services Vault. + string RegistrationStatus { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResource.json.cs new file mode 100644 index 000000000000..5c873d819338 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResource.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// The base backup engine class. All workload specific backup engines derive from this class. + /// + public partial class BackupEngineBaseResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupEngineBaseResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBase.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupEngineBaseResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResourceList.cs new file mode 100644 index 000000000000..32fb9604fd7e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of BackupEngineBase resources + public partial class BackupEngineBaseResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public BackupEngineBaseResourceList() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + } + /// List of BackupEngineBase resources + public partial interface IBackupEngineBaseResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource[] Value { get; set; } + + } + /// List of BackupEngineBase resources + internal partial interface IBackupEngineBaseResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResourceList.json.cs new file mode 100644 index 000000000000..3dda9a2a1b0d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineBaseResourceList.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of BackupEngineBase resources + public partial class BackupEngineBaseResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupEngineBaseResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBaseResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupEngineBaseResourceList(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineExtendedInfo.cs new file mode 100644 index 000000000000..e4fefe615a30 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineExtendedInfo.cs @@ -0,0 +1,170 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on backup engine. + public partial class BackupEngineExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfoInternal + { + + /// Backing field for property. + private double? _availableDiskSpace; + + /// Disk space currently available in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public double? AvailableDiskSpace { get => this._availableDiskSpace; set => this._availableDiskSpace = value; } + + /// Backing field for property. + private int? _azureProtectedInstance; + + /// Protected instances in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? AzureProtectedInstance { get => this._azureProtectedInstance; set => this._azureProtectedInstance = value; } + + /// Backing field for property. + private string _databaseName; + + /// Database name of backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DatabaseName { get => this._databaseName; set => this._databaseName = value; } + + /// Backing field for property. + private int? _diskCount; + + /// Number of disks in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? DiskCount { get => this._diskCount; set => this._diskCount = value; } + + /// Backing field for property. + private int? _protectedItemsCount; + + /// Number of protected items in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ProtectedItemsCount { get => this._protectedItemsCount; set => this._protectedItemsCount = value; } + + /// Backing field for property. + private int? _protectedServersCount; + + /// Number of protected servers in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ProtectedServersCount { get => this._protectedServersCount; set => this._protectedServersCount = value; } + + /// Backing field for property. + private global::System.DateTime? _refreshedAt; + + /// Last refresh time in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? RefreshedAt { get => this._refreshedAt; set => this._refreshedAt = value; } + + /// Backing field for property. + private double? _usedDiskSpace; + + /// Disk space used in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public double? UsedDiskSpace { get => this._usedDiskSpace; set => this._usedDiskSpace = value; } + + /// Creates an new instance. + public BackupEngineExtendedInfo() + { + + } + } + /// Additional information on backup engine. + public partial interface IBackupEngineExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Disk space currently available in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Disk space currently available in the backup engine.", + SerializedName = @"availableDiskSpace", + PossibleTypes = new [] { typeof(double) })] + double? AvailableDiskSpace { get; set; } + /// Protected instances in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protected instances in the backup engine.", + SerializedName = @"azureProtectedInstances", + PossibleTypes = new [] { typeof(int) })] + int? AzureProtectedInstance { get; set; } + /// Database name of backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Database name of backup engine.", + SerializedName = @"databaseName", + PossibleTypes = new [] { typeof(string) })] + string DatabaseName { get; set; } + /// Number of disks in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of disks in the backup engine.", + SerializedName = @"diskCount", + PossibleTypes = new [] { typeof(int) })] + int? DiskCount { get; set; } + /// Number of protected items in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of protected items in the backup engine.", + SerializedName = @"protectedItemsCount", + PossibleTypes = new [] { typeof(int) })] + int? ProtectedItemsCount { get; set; } + /// Number of protected servers in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of protected servers in the backup engine.", + SerializedName = @"protectedServersCount", + PossibleTypes = new [] { typeof(int) })] + int? ProtectedServersCount { get; set; } + /// Last refresh time in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last refresh time in the backup engine.", + SerializedName = @"refreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RefreshedAt { get; set; } + /// Disk space used in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Disk space used in the backup engine.", + SerializedName = @"usedDiskSpace", + PossibleTypes = new [] { typeof(double) })] + double? UsedDiskSpace { get; set; } + + } + /// Additional information on backup engine. + internal partial interface IBackupEngineExtendedInfoInternal + + { + /// Disk space currently available in the backup engine. + double? AvailableDiskSpace { get; set; } + /// Protected instances in the backup engine. + int? AzureProtectedInstance { get; set; } + /// Database name of backup engine. + string DatabaseName { get; set; } + /// Number of disks in the backup engine. + int? DiskCount { get; set; } + /// Number of protected items in the backup engine. + int? ProtectedItemsCount { get; set; } + /// Number of protected servers in the backup engine. + int? ProtectedServersCount { get; set; } + /// Last refresh time in the backup engine. + global::System.DateTime? RefreshedAt { get; set; } + /// Disk space used in the backup engine. + double? UsedDiskSpace { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineExtendedInfo.json.cs new file mode 100644 index 000000000000..7c884a91daea --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupEngineExtendedInfo.json.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on backup engine. + public partial class BackupEngineExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupEngineExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_databaseName = If( json?.PropertyT("databaseName"), out var __jsonDatabaseName) ? (string)__jsonDatabaseName : (string)DatabaseName;} + {_protectedItemsCount = If( json?.PropertyT("protectedItemsCount"), out var __jsonProtectedItemsCount) ? (int?)__jsonProtectedItemsCount : ProtectedItemsCount;} + {_protectedServersCount = If( json?.PropertyT("protectedServersCount"), out var __jsonProtectedServersCount) ? (int?)__jsonProtectedServersCount : ProtectedServersCount;} + {_diskCount = If( json?.PropertyT("diskCount"), out var __jsonDiskCount) ? (int?)__jsonDiskCount : DiskCount;} + {_usedDiskSpace = If( json?.PropertyT("usedDiskSpace"), out var __jsonUsedDiskSpace) ? (double?)__jsonUsedDiskSpace : UsedDiskSpace;} + {_availableDiskSpace = If( json?.PropertyT("availableDiskSpace"), out var __jsonAvailableDiskSpace) ? (double?)__jsonAvailableDiskSpace : AvailableDiskSpace;} + {_refreshedAt = If( json?.PropertyT("refreshedAt"), out var __jsonRefreshedAt) ? global::System.DateTime.TryParse((string)__jsonRefreshedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRefreshedAtValue) ? __jsonRefreshedAtValue : RefreshedAt : RefreshedAt;} + {_azureProtectedInstance = If( json?.PropertyT("azureProtectedInstances"), out var __jsonAzureProtectedInstances) ? (int?)__jsonAzureProtectedInstances : AzureProtectedInstance;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupEngineExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._databaseName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._databaseName.ToString()) : null, "databaseName" ,container.Add ); + AddIf( null != this._protectedItemsCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._protectedItemsCount) : null, "protectedItemsCount" ,container.Add ); + AddIf( null != this._protectedServersCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._protectedServersCount) : null, "protectedServersCount" ,container.Add ); + AddIf( null != this._diskCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._diskCount) : null, "diskCount" ,container.Add ); + AddIf( null != this._usedDiskSpace ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((double)this._usedDiskSpace) : null, "usedDiskSpace" ,container.Add ); + AddIf( null != this._availableDiskSpace ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((double)this._availableDiskSpace) : null, "availableDiskSpace" ,container.Add ); + AddIf( null != this._refreshedAt ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._refreshedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "refreshedAt" ,container.Add ); + AddIf( null != this._azureProtectedInstance ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._azureProtectedInstance) : null, "azureProtectedInstances" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsage.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsage.cs new file mode 100644 index 000000000000..ac806fdf2f1a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsage.cs @@ -0,0 +1,159 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup management usages of a vault. + public partial class BackupManagementUsage : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsageInternal + { + + /// Backing field for property. + private long? _currentValue; + + /// Current value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? CurrentValue { get => this._currentValue; set => this._currentValue = value; } + + /// Backing field for property. + private long? _limit; + + /// Limit of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? Limit { get => this._limit; set => this._limit = value; } + + /// Internal Acessors for Name + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsageInternal.Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NameInfo()); set { {_name = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfo _name; + + /// Name of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfo Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NameInfo()); set => this._name = value; } + + /// Localized value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfoInternal)Name).LocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfoInternal)Name).LocalizedValue = value ?? null; } + + /// Value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfoInternal)Name).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfoInternal)Name).Value = value ?? null; } + + /// Backing field for property. + private global::System.DateTime? _nextResetTime; + + /// Next reset time of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? NextResetTime { get => this._nextResetTime; set => this._nextResetTime = value; } + + /// Backing field for property. + private string _quotaPeriod; + + /// Quota period of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string QuotaPeriod { get => this._quotaPeriod; set => this._quotaPeriod = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit? _unit; + + /// Unit of the usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit? Unit { get => this._unit; set => this._unit = value; } + + /// Creates an new instance. + public BackupManagementUsage() + { + + } + } + /// Backup management usages of a vault. + public partial interface IBackupManagementUsage : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Current value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Current value of usage.", + SerializedName = @"currentValue", + PossibleTypes = new [] { typeof(long) })] + long? CurrentValue { get; set; } + /// Limit of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Limit of usage.", + SerializedName = @"limit", + PossibleTypes = new [] { typeof(long) })] + long? Limit { get; set; } + /// Localized value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Localized value of usage.", + SerializedName = @"localizedValue", + PossibleTypes = new [] { typeof(string) })] + string NameLocalizedValue { get; set; } + /// Value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value of usage.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string NameValue { get; set; } + /// Next reset time of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Next reset time of usage.", + SerializedName = @"nextResetTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? NextResetTime { get; set; } + /// Quota period of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Quota period of usage.", + SerializedName = @"quotaPeriod", + PossibleTypes = new [] { typeof(string) })] + string QuotaPeriod { get; set; } + /// Unit of the usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Unit of the usage.", + SerializedName = @"unit", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit? Unit { get; set; } + + } + /// Backup management usages of a vault. + internal partial interface IBackupManagementUsageInternal + + { + /// Current value of usage. + long? CurrentValue { get; set; } + /// Limit of usage. + long? Limit { get; set; } + /// Name of usage. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfo Name { get; set; } + /// Localized value of usage. + string NameLocalizedValue { get; set; } + /// Value of usage. + string NameValue { get; set; } + /// Next reset time of usage. + global::System.DateTime? NextResetTime { get; set; } + /// Quota period of usage. + string QuotaPeriod { get; set; } + /// Unit of the usage. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit? Unit { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsage.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsage.json.cs new file mode 100644 index 000000000000..ed5cf1799fac --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsage.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup management usages of a vault. + public partial class BackupManagementUsage + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupManagementUsage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NameInfo.FromJson(__jsonName) : Name;} + {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit;} + {_quotaPeriod = If( json?.PropertyT("quotaPeriod"), out var __jsonQuotaPeriod) ? (string)__jsonQuotaPeriod : (string)QuotaPeriod;} + {_nextResetTime = If( json?.PropertyT("nextResetTime"), out var __jsonNextResetTime) ? global::System.DateTime.TryParse((string)__jsonNextResetTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonNextResetTimeValue) ? __jsonNextResetTimeValue : NextResetTime : NextResetTime;} + {_currentValue = If( json?.PropertyT("currentValue"), out var __jsonCurrentValue) ? (long?)__jsonCurrentValue : CurrentValue;} + {_limit = If( json?.PropertyT("limit"), out var __jsonLimit) ? (long?)__jsonLimit : Limit;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupManagementUsage(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._name ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._name.ToJson(null,serializationMode) : null, "name" ,container.Add ); + AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add ); + AddIf( null != (((object)this._quotaPeriod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._quotaPeriod.ToString()) : null, "quotaPeriod" ,container.Add ); + AddIf( null != this._nextResetTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._nextResetTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "nextResetTime" ,container.Add ); + AddIf( null != this._currentValue ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._currentValue) : null, "currentValue" ,container.Add ); + AddIf( null != this._limit ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._limit) : null, "limit" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsageList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsageList.cs new file mode 100644 index 000000000000..0d3ffef5c54b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsageList.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup management usage for vault. + public partial class BackupManagementUsageList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsageList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsageListInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage[] _value; + + /// The list of backup management usages for the given vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public BackupManagementUsageList() + { + + } + } + /// Backup management usage for vault. + public partial interface IBackupManagementUsageList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The list of backup management usages for the given vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of backup management usages for the given vault.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage[] Value { get; set; } + + } + /// Backup management usage for vault. + internal partial interface IBackupManagementUsageListInternal + + { + /// The list of backup management usages for the given vault. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsageList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsageList.json.cs new file mode 100644 index 000000000000..f3edc8283b33 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupManagementUsageList.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup management usage for vault. + public partial class BackupManagementUsageList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupManagementUsageList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsage) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupManagementUsage.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsageList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsageList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupManagementUsageList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupManagementUsageList(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequest.cs new file mode 100644 index 000000000000..6d754162985f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequest.cs @@ -0,0 +1,59 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup request. Workload-specific backup requests are derived from this class. + /// + public partial class BackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Creates an new instance. + public BackupRequest() + { + + } + } + /// Base class for backup request. Workload-specific backup requests are derived from this class. + public partial interface IBackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Base class for backup request. Workload-specific backup requests are derived from this class. + internal partial interface IBackupRequestInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequest.json.cs new file mode 100644 index 000000000000..5fdeb5611976 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequest.json.cs @@ -0,0 +1,133 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup request. Workload-specific backup requests are derived from this class. + /// + public partial class BackupRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureFileShareBackupRequest": + { + return new AzureFileShareBackupRequest(json); + } + case "AzureWorkloadBackupRequest": + { + return new AzureWorkloadBackupRequest(json); + } + case "IaasVMBackupRequest": + { + return new IaasVMBackupRequest(json); + } + } + return new BackupRequest(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequestResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequestResource.cs new file mode 100644 index 000000000000..b42bdf641360 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequestResource.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup request. Workload-specific backup requests are derived from this class. + /// + public partial class BackupRequestResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupRequest()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal)Property).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal)Property).ObjectType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest _property; + + /// BackupRequestResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupRequest()); set => this._property = value; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public BackupRequestResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Base class for backup request. Workload-specific backup requests are derived from this class. + public partial interface IBackupRequestResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Base class for backup request. Workload-specific backup requests are derived from this class. + internal partial interface IBackupRequestResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + /// BackupRequestResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest Property { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequestResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequestResource.json.cs new file mode 100644 index 000000000000..f9bec086c4a5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupRequestResource.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup request. Workload-specific backup requests are derived from this class. + /// + public partial class BackupRequestResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupRequestResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupRequest.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupRequestResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfig.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfig.cs new file mode 100644 index 000000000000..2373796bc83c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfig.cs @@ -0,0 +1,142 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The resource storage details. + public partial class BackupResourceConfig : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfig, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal + { + + /// Backing field for property. + private bool? _crossRegionRestoreFlag; + + /// Opt in details of Cross Region Restore feature. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? CrossRegionRestoreFlag { get => this._crossRegionRestoreFlag; set => this._crossRegionRestoreFlag = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState? _dedupState; + + /// Vault Dedup state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState? DedupState { get => this._dedupState; set => this._dedupState = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? _storageModelType; + + /// Storage type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get => this._storageModelType; set => this._storageModelType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? _storageType; + + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get => this._storageType; set => this._storageType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? _storageTypeState; + + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get => this._storageTypeState; set => this._storageTypeState = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState? _xcoolState; + + /// Vault x-cool state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState? XcoolState { get => this._xcoolState; set => this._xcoolState = value; } + + /// Creates an new instance. + public BackupResourceConfig() + { + + } + } + /// The resource storage details. + public partial interface IBackupResourceConfig : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Opt in details of Cross Region Restore feature. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Opt in details of Cross Region Restore feature.", + SerializedName = @"crossRegionRestoreFlag", + PossibleTypes = new [] { typeof(bool) })] + bool? CrossRegionRestoreFlag { get; set; } + /// Vault Dedup state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Vault Dedup state", + SerializedName = @"dedupState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState? DedupState { get; set; } + /// Storage type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage type", + SerializedName = @"storageModelType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get; set; } + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage type.", + SerializedName = @"storageType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get; set; } + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.", + SerializedName = @"storageTypeState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get; set; } + /// Vault x-cool state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Vault x-cool state", + SerializedName = @"xcoolState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState? XcoolState { get; set; } + + } + /// The resource storage details. + internal partial interface IBackupResourceConfigInternal + + { + /// Opt in details of Cross Region Restore feature. + bool? CrossRegionRestoreFlag { get; set; } + /// Vault Dedup state + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState? DedupState { get; set; } + /// Storage type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get; set; } + /// Storage type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get; set; } + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get; set; } + /// Vault x-cool state + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState? XcoolState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfig.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfig.json.cs new file mode 100644 index 000000000000..1dd58e80e5b2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfig.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The resource storage details. + public partial class BackupResourceConfig + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupResourceConfig(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_storageModelType = If( json?.PropertyT("storageModelType"), out var __jsonStorageModelType) ? (string)__jsonStorageModelType : (string)StorageModelType;} + {_storageType = If( json?.PropertyT("storageType"), out var __jsonStorageType) ? (string)__jsonStorageType : (string)StorageType;} + {_storageTypeState = If( json?.PropertyT("storageTypeState"), out var __jsonStorageTypeState) ? (string)__jsonStorageTypeState : (string)StorageTypeState;} + {_crossRegionRestoreFlag = If( json?.PropertyT("crossRegionRestoreFlag"), out var __jsonCrossRegionRestoreFlag) ? (bool?)__jsonCrossRegionRestoreFlag : CrossRegionRestoreFlag;} + {_dedupState = If( json?.PropertyT("dedupState"), out var __jsonDedupState) ? (string)__jsonDedupState : (string)DedupState;} + {_xcoolState = If( json?.PropertyT("xcoolState"), out var __jsonXcoolState) ? (string)__jsonXcoolState : (string)XcoolState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupResourceConfig(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._storageModelType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageModelType.ToString()) : null, "storageModelType" ,container.Add ); + AddIf( null != (((object)this._storageType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageType.ToString()) : null, "storageType" ,container.Add ); + AddIf( null != (((object)this._storageTypeState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageTypeState.ToString()) : null, "storageTypeState" ,container.Add ); + AddIf( null != this._crossRegionRestoreFlag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._crossRegionRestoreFlag) : null, "crossRegionRestoreFlag" ,container.Add ); + AddIf( null != (((object)this._dedupState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dedupState.ToString()) : null, "dedupState" ,container.Add ); + AddIf( null != (((object)this._xcoolState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._xcoolState.ToString()) : null, "xcoolState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfigResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfigResource.cs new file mode 100644 index 000000000000..1a87e66e51eb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfigResource.cs @@ -0,0 +1,190 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The resource storage details. + public partial class BackupResourceConfigResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Opt in details of Cross Region Restore feature. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? CrossRegionRestoreFlag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).CrossRegionRestoreFlag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).CrossRegionRestoreFlag = value ?? default(bool); } + + /// Vault Dedup state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState? DedupState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).DedupState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).DedupState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState)""); } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfig Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceConfig()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfig _property; + + /// BackupResourceConfigResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfig Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceConfig()); set => this._property = value; } + + /// Storage type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).StorageModelType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).StorageModelType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType)""); } + + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).StorageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).StorageType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType)""); } + + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).StorageTypeState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).StorageTypeState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Vault x-cool state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState? XcoolState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).XcoolState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigInternal)Property).XcoolState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState)""); } + + /// Creates an new instance. + public BackupResourceConfigResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource storage details. + public partial interface IBackupResourceConfigResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Opt in details of Cross Region Restore feature. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Opt in details of Cross Region Restore feature.", + SerializedName = @"crossRegionRestoreFlag", + PossibleTypes = new [] { typeof(bool) })] + bool? CrossRegionRestoreFlag { get; set; } + /// Vault Dedup state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Vault Dedup state", + SerializedName = @"dedupState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState? DedupState { get; set; } + /// Storage type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage type", + SerializedName = @"storageModelType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get; set; } + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage type.", + SerializedName = @"storageType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get; set; } + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.", + SerializedName = @"storageTypeState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get; set; } + /// Vault x-cool state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Vault x-cool state", + SerializedName = @"xcoolState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState? XcoolState { get; set; } + + } + /// The resource storage details. + internal partial interface IBackupResourceConfigResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Opt in details of Cross Region Restore feature. + bool? CrossRegionRestoreFlag { get; set; } + /// Vault Dedup state + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState? DedupState { get; set; } + /// BackupResourceConfigResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfig Property { get; set; } + /// Storage type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get; set; } + /// Storage type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get; set; } + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get; set; } + /// Vault x-cool state + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState? XcoolState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfigResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfigResource.json.cs new file mode 100644 index 000000000000..9556e887b778 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceConfigResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The resource storage details. + public partial class BackupResourceConfigResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupResourceConfigResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceConfig.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupResourceConfigResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfig.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfig.cs new file mode 100644 index 000000000000..f948148632bd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfig.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class BackupResourceEncryptionConfig : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? _encryptionAtRestType; + + /// Encryption At Rest Type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get => this._encryptionAtRestType; set => this._encryptionAtRestType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? _infrastructureEncryptionState; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get => this._infrastructureEncryptionState; set => this._infrastructureEncryptionState = value; } + + /// Backing field for property. + private string _keyUri; + + /// Key Vault Key URI + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string KeyUri { get => this._keyUri; set => this._keyUri = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? _lastUpdateStatus; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get => this._lastUpdateStatus; set => this._lastUpdateStatus = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Key Vault Subscription Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Creates an new instance. + public BackupResourceEncryptionConfig() + { + + } + } + public partial interface IBackupResourceEncryptionConfig : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Encryption At Rest Type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Encryption At Rest Type", + SerializedName = @"encryptionAtRestType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"infrastructureEncryptionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get; set; } + /// Key Vault Key URI + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Vault Key URI", + SerializedName = @"keyUri", + PossibleTypes = new [] { typeof(string) })] + string KeyUri { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"lastUpdateStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get; set; } + /// Key Vault Subscription Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Vault Subscription Id", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + + } + internal partial interface IBackupResourceEncryptionConfigInternal + + { + /// Encryption At Rest Type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get; set; } + /// Key Vault Key URI + string KeyUri { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get; set; } + /// Key Vault Subscription Id + string SubscriptionId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfig.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfig.json.cs new file mode 100644 index 000000000000..3f49b2a2eb61 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfig.json.cs @@ -0,0 +1,115 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class BackupResourceEncryptionConfig + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupResourceEncryptionConfig(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_encryptionAtRestType = If( json?.PropertyT("encryptionAtRestType"), out var __jsonEncryptionAtRestType) ? (string)__jsonEncryptionAtRestType : (string)EncryptionAtRestType;} + {_keyUri = If( json?.PropertyT("keyUri"), out var __jsonKeyUri) ? (string)__jsonKeyUri : (string)KeyUri;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_lastUpdateStatus = If( json?.PropertyT("lastUpdateStatus"), out var __jsonLastUpdateStatus) ? (string)__jsonLastUpdateStatus : (string)LastUpdateStatus;} + {_infrastructureEncryptionState = If( json?.PropertyT("infrastructureEncryptionState"), out var __jsonInfrastructureEncryptionState) ? (string)__jsonInfrastructureEncryptionState : (string)InfrastructureEncryptionState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupResourceEncryptionConfig(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._encryptionAtRestType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._encryptionAtRestType.ToString()) : null, "encryptionAtRestType" ,container.Add ); + AddIf( null != (((object)this._keyUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._keyUri.ToString()) : null, "keyUri" ,container.Add ); + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._lastUpdateStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastUpdateStatus.ToString()) : null, "lastUpdateStatus" ,container.Add ); + AddIf( null != (((object)this._infrastructureEncryptionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._infrastructureEncryptionState.ToString()) : null, "infrastructureEncryptionState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtended.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtended.cs new file mode 100644 index 000000000000..86da72d12d06 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtended.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class BackupResourceEncryptionConfigExtended : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtended, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig __backupResourceEncryptionConfig = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceEncryptionConfig(); + + /// Encryption At Rest Type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).EncryptionAtRestType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).EncryptionAtRestType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType)""); } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).InfrastructureEncryptionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).InfrastructureEncryptionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState)""); } + + /// Key Vault Key URI + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string KeyUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).KeyUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).KeyUri = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).LastUpdateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).LastUpdateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus)""); } + + /// Key Vault Subscription Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).SubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)__backupResourceEncryptionConfig).SubscriptionId = value ?? null; } + + /// Backing field for property. + private bool? _useSystemAssignedIdentity; + + /// bool to indicate whether to use system Assigned Identity or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? UseSystemAssignedIdentity { get => this._useSystemAssignedIdentity; set => this._useSystemAssignedIdentity = value; } + + /// Backing field for property. + private string _userAssignedIdentity; + + /// User Assigned Identity Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string UserAssignedIdentity { get => this._userAssignedIdentity; set => this._userAssignedIdentity = value; } + + /// Creates an new instance. + public BackupResourceEncryptionConfigExtended() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__backupResourceEncryptionConfig), __backupResourceEncryptionConfig); + await eventListener.AssertObjectIsValid(nameof(__backupResourceEncryptionConfig), __backupResourceEncryptionConfig); + } + } + public partial interface IBackupResourceEncryptionConfigExtended : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig + { + /// bool to indicate whether to use system Assigned Identity or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"bool to indicate whether to use system Assigned Identity or not", + SerializedName = @"useSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool? UseSystemAssignedIdentity { get; set; } + /// User Assigned Identity Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User Assigned Identity Id", + SerializedName = @"userAssignedIdentity", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentity { get; set; } + + } + internal partial interface IBackupResourceEncryptionConfigExtendedInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal + { + /// bool to indicate whether to use system Assigned Identity or not + bool? UseSystemAssignedIdentity { get; set; } + /// User Assigned Identity Id + string UserAssignedIdentity { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtended.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtended.json.cs new file mode 100644 index 000000000000..edf14261be10 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtended.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class BackupResourceEncryptionConfigExtended + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupResourceEncryptionConfigExtended(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __backupResourceEncryptionConfig = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceEncryptionConfig(json); + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentity"), out var __jsonUserAssignedIdentity) ? (string)__jsonUserAssignedIdentity : (string)UserAssignedIdentity;} + {_useSystemAssignedIdentity = If( json?.PropertyT("useSystemAssignedIdentity"), out var __jsonUseSystemAssignedIdentity) ? (bool?)__jsonUseSystemAssignedIdentity : UseSystemAssignedIdentity;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtended. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtended. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtended FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupResourceEncryptionConfigExtended(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __backupResourceEncryptionConfig?.ToJson(container, serializationMode); + AddIf( null != (((object)this._userAssignedIdentity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._userAssignedIdentity.ToString()) : null, "userAssignedIdentity" ,container.Add ); + AddIf( null != this._useSystemAssignedIdentity ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._useSystemAssignedIdentity) : null, "useSystemAssignedIdentity" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtendedResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtendedResource.cs new file mode 100644 index 000000000000..acf410537ae2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtendedResource.cs @@ -0,0 +1,195 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class BackupResourceEncryptionConfigExtendedResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Encryption At Rest Type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).EncryptionAtRestType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).EncryptionAtRestType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType)""); } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).InfrastructureEncryptionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).InfrastructureEncryptionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState)""); } + + /// Key Vault Key URI + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string KeyUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).KeyUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).KeyUri = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).LastUpdateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).LastUpdateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus)""); } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtended Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceEncryptionConfigExtended()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtended _property; + + /// BackupResourceEncryptionConfigExtendedResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtended Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceEncryptionConfigExtended()); set => this._property = value; } + + /// Key Vault Subscription Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).SubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).SubscriptionId = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// bool to indicate whether to use system Assigned Identity or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? UseSystemAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedInternal)Property).UseSystemAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedInternal)Property).UseSystemAssignedIdentity = value ?? default(bool); } + + /// User Assigned Identity Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedInternal)Property).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedInternal)Property).UserAssignedIdentity = value ?? null; } + + /// + /// Creates an new instance. + /// + public BackupResourceEncryptionConfigExtendedResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + public partial interface IBackupResourceEncryptionConfigExtendedResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Encryption At Rest Type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Encryption At Rest Type", + SerializedName = @"encryptionAtRestType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"infrastructureEncryptionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get; set; } + /// Key Vault Key URI + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Vault Key URI", + SerializedName = @"keyUri", + PossibleTypes = new [] { typeof(string) })] + string KeyUri { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"lastUpdateStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get; set; } + /// Key Vault Subscription Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Vault Subscription Id", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + /// bool to indicate whether to use system Assigned Identity or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"bool to indicate whether to use system Assigned Identity or not", + SerializedName = @"useSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool? UseSystemAssignedIdentity { get; set; } + /// User Assigned Identity Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User Assigned Identity Id", + SerializedName = @"userAssignedIdentity", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentity { get; set; } + + } + internal partial interface IBackupResourceEncryptionConfigExtendedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Encryption At Rest Type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get; set; } + /// Key Vault Key URI + string KeyUri { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get; set; } + /// BackupResourceEncryptionConfigExtendedResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtended Property { get; set; } + /// Key Vault Subscription Id + string SubscriptionId { get; set; } + /// bool to indicate whether to use system Assigned Identity or not + bool? UseSystemAssignedIdentity { get; set; } + /// User Assigned Identity Id + string UserAssignedIdentity { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtendedResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtendedResource.json.cs new file mode 100644 index 000000000000..0dc102cc33ea --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigExtendedResource.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class BackupResourceEncryptionConfigExtendedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupResourceEncryptionConfigExtendedResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceEncryptionConfigExtended.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigExtendedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupResourceEncryptionConfigExtendedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigResource.cs new file mode 100644 index 000000000000..a83bc8992625 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigResource.cs @@ -0,0 +1,165 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class BackupResourceEncryptionConfigResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Encryption At Rest Type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).EncryptionAtRestType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).EncryptionAtRestType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType)""); } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).InfrastructureEncryptionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).InfrastructureEncryptionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState)""); } + + /// Key Vault Key URI + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string KeyUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).KeyUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).KeyUri = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).LastUpdateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).LastUpdateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus)""); } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceEncryptionConfig()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig _property; + + /// BackupResourceEncryptionConfigResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceEncryptionConfig()); set => this._property = value; } + + /// Key Vault Subscription Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).SubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigInternal)Property).SubscriptionId = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public BackupResourceEncryptionConfigResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + public partial interface IBackupResourceEncryptionConfigResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Encryption At Rest Type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Encryption At Rest Type", + SerializedName = @"encryptionAtRestType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"infrastructureEncryptionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get; set; } + /// Key Vault Key URI + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Vault Key URI", + SerializedName = @"keyUri", + PossibleTypes = new [] { typeof(string) })] + string KeyUri { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"lastUpdateStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get; set; } + /// Key Vault Subscription Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Vault Subscription Id", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + + } + internal partial interface IBackupResourceEncryptionConfigResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Encryption At Rest Type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType? EncryptionAtRestType { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState? InfrastructureEncryptionState { get; set; } + /// Key Vault Key URI + string KeyUri { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus? LastUpdateStatus { get; set; } + /// BackupResourceEncryptionConfigResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfig Property { get; set; } + /// Key Vault Subscription Id + string SubscriptionId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigResource.json.cs new file mode 100644 index 000000000000..f83743e4e762 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceEncryptionConfigResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class BackupResourceEncryptionConfigResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupResourceEncryptionConfigResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceEncryptionConfig.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupResourceEncryptionConfigResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfig.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfig.cs new file mode 100644 index 000000000000..2373c34a0c84 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfig.cs @@ -0,0 +1,182 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup resource vault config details. + public partial class BackupResourceVaultConfig : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfig, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState? _enhancedSecurityState; + + /// Enabled or Disabled. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState? EnhancedSecurityState { get => this._enhancedSecurityState; set => this._enhancedSecurityState = value; } + + /// Backing field for property. + private bool? _isSoftDeleteFeatureStateEditable; + + /// + /// This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsSoftDeleteFeatureStateEditable { get => this._isSoftDeleteFeatureStateEditable; set => this._isSoftDeleteFeatureStateEditable = value; } + + /// Backing field for property. + private string[] _resourceGuardOperationRequest; + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] ResourceGuardOperationRequest { get => this._resourceGuardOperationRequest; set => this._resourceGuardOperationRequest = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState? _softDeleteFeatureState; + + /// Soft Delete feature state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState? SoftDeleteFeatureState { get => this._softDeleteFeatureState; set => this._softDeleteFeatureState = value; } + + /// Backing field for property. + private int? _softDeleteRetentionPeriodInDay; + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? SoftDeleteRetentionPeriodInDay { get => this._softDeleteRetentionPeriodInDay; set => this._softDeleteRetentionPeriodInDay = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? _storageModelType; + + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get => this._storageModelType; set => this._storageModelType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? _storageType; + + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get => this._storageType; set => this._storageType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? _storageTypeState; + + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get => this._storageTypeState; set => this._storageTypeState = value; } + + /// Creates an new instance. + public BackupResourceVaultConfig() + { + + } + } + /// Backup resource vault config details. + public partial interface IBackupResourceVaultConfig : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Enabled or Disabled. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enabled or Disabled.", + SerializedName = @"enhancedSecurityState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState? EnhancedSecurityState { get; set; } + /// + /// This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault", + SerializedName = @"isSoftDeleteFeatureStateEditable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSoftDeleteFeatureStateEditable { get; set; } + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuard Operation Requests", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + /// Soft Delete feature state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Soft Delete feature state", + SerializedName = @"softDeleteFeatureState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState? SoftDeleteFeatureState { get; set; } + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Soft delete retention period in days", + SerializedName = @"softDeleteRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? SoftDeleteRetentionPeriodInDay { get; set; } + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage type.", + SerializedName = @"storageModelType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get; set; } + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage type.", + SerializedName = @"storageType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get; set; } + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.", + SerializedName = @"storageTypeState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get; set; } + + } + /// Backup resource vault config details. + internal partial interface IBackupResourceVaultConfigInternal + + { + /// Enabled or Disabled. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState? EnhancedSecurityState { get; set; } + /// + /// This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault + /// + bool? IsSoftDeleteFeatureStateEditable { get; set; } + /// ResourceGuard Operation Requests + string[] ResourceGuardOperationRequest { get; set; } + /// Soft Delete feature state + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState? SoftDeleteFeatureState { get; set; } + /// Soft delete retention period in days + int? SoftDeleteRetentionPeriodInDay { get; set; } + /// Storage type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get; set; } + /// Storage type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get; set; } + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfig.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfig.json.cs new file mode 100644 index 000000000000..6ebfc3be12d4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfig.json.cs @@ -0,0 +1,130 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup resource vault config details. + public partial class BackupResourceVaultConfig + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupResourceVaultConfig(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_storageModelType = If( json?.PropertyT("storageModelType"), out var __jsonStorageModelType) ? (string)__jsonStorageModelType : (string)StorageModelType;} + {_storageType = If( json?.PropertyT("storageType"), out var __jsonStorageType) ? (string)__jsonStorageType : (string)StorageType;} + {_storageTypeState = If( json?.PropertyT("storageTypeState"), out var __jsonStorageTypeState) ? (string)__jsonStorageTypeState : (string)StorageTypeState;} + {_enhancedSecurityState = If( json?.PropertyT("enhancedSecurityState"), out var __jsonEnhancedSecurityState) ? (string)__jsonEnhancedSecurityState : (string)EnhancedSecurityState;} + {_softDeleteFeatureState = If( json?.PropertyT("softDeleteFeatureState"), out var __jsonSoftDeleteFeatureState) ? (string)__jsonSoftDeleteFeatureState : (string)SoftDeleteFeatureState;} + {_softDeleteRetentionPeriodInDay = If( json?.PropertyT("softDeleteRetentionPeriodInDays"), out var __jsonSoftDeleteRetentionPeriodInDays) ? (int?)__jsonSoftDeleteRetentionPeriodInDays : SoftDeleteRetentionPeriodInDay;} + {_resourceGuardOperationRequest = If( json?.PropertyT("resourceGuardOperationRequests"), out var __jsonResourceGuardOperationRequests) ? If( __jsonResourceGuardOperationRequests as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ResourceGuardOperationRequest;} + {_isSoftDeleteFeatureStateEditable = If( json?.PropertyT("isSoftDeleteFeatureStateEditable"), out var __jsonIsSoftDeleteFeatureStateEditable) ? (bool?)__jsonIsSoftDeleteFeatureStateEditable : IsSoftDeleteFeatureStateEditable;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupResourceVaultConfig(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._storageModelType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageModelType.ToString()) : null, "storageModelType" ,container.Add ); + AddIf( null != (((object)this._storageType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageType.ToString()) : null, "storageType" ,container.Add ); + AddIf( null != (((object)this._storageTypeState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageTypeState.ToString()) : null, "storageTypeState" ,container.Add ); + AddIf( null != (((object)this._enhancedSecurityState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._enhancedSecurityState.ToString()) : null, "enhancedSecurityState" ,container.Add ); + AddIf( null != (((object)this._softDeleteFeatureState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._softDeleteFeatureState.ToString()) : null, "softDeleteFeatureState" ,container.Add ); + AddIf( null != this._softDeleteRetentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._softDeleteRetentionPeriodInDay) : null, "softDeleteRetentionPeriodInDays" ,container.Add ); + if (null != this._resourceGuardOperationRequest) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourceGuardOperationRequest ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("resourceGuardOperationRequests",__w); + } + AddIf( null != this._isSoftDeleteFeatureStateEditable ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isSoftDeleteFeatureStateEditable) : null, "isSoftDeleteFeatureStateEditable" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfigResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfigResource.cs new file mode 100644 index 000000000000..fe694c14bd65 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfigResource.cs @@ -0,0 +1,224 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup resource vault config details. + public partial class BackupResourceVaultConfigResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Enabled or Disabled. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState? EnhancedSecurityState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).EnhancedSecurityState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).EnhancedSecurityState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState)""); } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// + /// This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? IsSoftDeleteFeatureStateEditable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).IsSoftDeleteFeatureStateEditable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).IsSoftDeleteFeatureStateEditable = value ?? default(bool); } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfig Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceVaultConfig()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfig _property; + + /// BackupResourceVaultConfigResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfig Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceVaultConfig()); set => this._property = value; } + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft Delete feature state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState? SoftDeleteFeatureState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).SoftDeleteFeatureState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).SoftDeleteFeatureState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState)""); } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).StorageModelType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).StorageModelType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType)""); } + + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).StorageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).StorageType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType)""); } + + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).StorageTypeState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigInternal)Property).StorageTypeState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public BackupResourceVaultConfigResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Backup resource vault config details. + public partial interface IBackupResourceVaultConfigResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Enabled or Disabled. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enabled or Disabled.", + SerializedName = @"enhancedSecurityState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState? EnhancedSecurityState { get; set; } + /// + /// This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault", + SerializedName = @"isSoftDeleteFeatureStateEditable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSoftDeleteFeatureStateEditable { get; set; } + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuard Operation Requests", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + /// Soft Delete feature state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Soft Delete feature state", + SerializedName = @"softDeleteFeatureState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState? SoftDeleteFeatureState { get; set; } + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Soft delete retention period in days", + SerializedName = @"softDeleteRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? SoftDeleteRetentionPeriodInDay { get; set; } + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage type.", + SerializedName = @"storageModelType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get; set; } + /// Storage type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage type.", + SerializedName = @"storageType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get; set; } + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.", + SerializedName = @"storageTypeState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get; set; } + + } + /// Backup resource vault config details. + internal partial interface IBackupResourceVaultConfigResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Enabled or Disabled. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState? EnhancedSecurityState { get; set; } + /// + /// This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault + /// + bool? IsSoftDeleteFeatureStateEditable { get; set; } + /// BackupResourceVaultConfigResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfig Property { get; set; } + /// ResourceGuard Operation Requests + string[] ResourceGuardOperationRequest { get; set; } + /// Soft Delete feature state + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState? SoftDeleteFeatureState { get; set; } + /// Soft delete retention period in days + int? SoftDeleteRetentionPeriodInDay { get; set; } + /// Storage type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageModelType { get; set; } + /// Storage type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType? StorageType { get; set; } + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState? StorageTypeState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfigResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfigResource.json.cs new file mode 100644 index 000000000000..331342466b98 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupResourceVaultConfigResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Backup resource vault config details. + public partial class BackupResourceVaultConfigResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupResourceVaultConfigResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceVaultConfig.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupResourceVaultConfigResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusRequest.cs new file mode 100644 index 000000000000..8d6f13112e78 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusRequest.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// BackupStatus request. + public partial class BackupStatusRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusRequestInternal + { + + /// Backing field for property. + private string _poLogicalName; + + /// Protectable Item Logical Name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PoLogicalName { get => this._poLogicalName; set => this._poLogicalName = value; } + + /// Backing field for property. + private string _resourceId; + + /// Entire ARM resource id of the resource + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceId { get => this._resourceId; set => this._resourceId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? _resourceType; + + /// Container Type - VM, SQLPaaS, DPM, AzureFileShare... + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? ResourceType { get => this._resourceType; set => this._resourceType = value; } + + /// Creates an new instance. + public BackupStatusRequest() + { + + } + } + /// BackupStatus request. + public partial interface IBackupStatusRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Protectable Item Logical Name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protectable Item Logical Name", + SerializedName = @"poLogicalName", + PossibleTypes = new [] { typeof(string) })] + string PoLogicalName { get; set; } + /// Entire ARM resource id of the resource + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Entire ARM resource id of the resource", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; set; } + /// Container Type - VM, SQLPaaS, DPM, AzureFileShare... + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Container Type - VM, SQLPaaS, DPM, AzureFileShare...", + SerializedName = @"resourceType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? ResourceType { get; set; } + + } + /// BackupStatus request. + internal partial interface IBackupStatusRequestInternal + + { + /// Protectable Item Logical Name + string PoLogicalName { get; set; } + /// Entire ARM resource id of the resource + string ResourceId { get; set; } + /// Container Type - VM, SQLPaaS, DPM, AzureFileShare... + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? ResourceType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusRequest.json.cs new file mode 100644 index 000000000000..a9277118af9c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusRequest.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// BackupStatus request. + public partial class BackupStatusRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupStatusRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceType = If( json?.PropertyT("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)ResourceType;} + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} + {_poLogicalName = If( json?.PropertyT("poLogicalName"), out var __jsonPoLogicalName) ? (string)__jsonPoLogicalName : (string)PoLogicalName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupStatusRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType" ,container.Add ); + AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); + AddIf( null != (((object)this._poLogicalName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._poLogicalName.ToString()) : null, "poLogicalName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusResponse.cs new file mode 100644 index 000000000000..f63fde510986 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusResponse.cs @@ -0,0 +1,227 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// BackupStatus response. + public partial class BackupStatusResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusResponseInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock? _acquireStorageAccountLock; + + /// Specifies whether the storage account lock has been acquired or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock? AcquireStorageAccountLock { get => this._acquireStorageAccountLock; set => this._acquireStorageAccountLock = value; } + + /// Backing field for property. + private string _containerName; + + /// + /// Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// Backing field for property. + private string _errorCode; + + /// ErrorCode in case of intent failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorCode { get => this._errorCode; set => this._errorCode = value; } + + /// Backing field for property. + private string _errorMessage; + + /// ErrorMessage in case of intent failed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorMessage { get => this._errorMessage; set => this._errorMessage = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName? _fabricName; + + /// Specifies the fabric name - Azure or AD + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName? FabricName { get => this._fabricName; set => this._fabricName = value; } + + /// Backing field for property. + private string _policyName; + + /// Specifies the policy name which is used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyName { get => this._policyName; set => this._policyName = value; } + + /// Backing field for property. + private string _protectedItemName; + + /// Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectedItemName { get => this._protectedItemName; set => this._protectedItemName = value; } + + /// Backing field for property. + private int? _protectedItemsCount; + + /// Number of protected items + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ProtectedItemsCount { get => this._protectedItemsCount; set => this._protectedItemsCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? _protectionStatus; + + /// Specifies whether the container is registered or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionStatus { get => this._protectionStatus; set => this._protectionStatus = value; } + + /// Backing field for property. + private string _registrationStatus; + + /// Container registration status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RegistrationStatus { get => this._registrationStatus; set => this._registrationStatus = value; } + + /// Backing field for property. + private string _vaultId; + + /// Specifies the arm resource id of the vault + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VaultId { get => this._vaultId; set => this._vaultId = value; } + + /// Creates an new instance. + public BackupStatusResponse() + { + + } + } + /// BackupStatus response. + public partial interface IBackupStatusResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Specifies whether the storage account lock has been acquired or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the storage account lock has been acquired or not", + SerializedName = @"acquireStorageAccountLock", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock? AcquireStorageAccountLock { get; set; } + /// + /// Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname.", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// ErrorCode in case of intent failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ErrorCode in case of intent failed", + SerializedName = @"errorCode", + PossibleTypes = new [] { typeof(string) })] + string ErrorCode { get; set; } + /// ErrorMessage in case of intent failed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ErrorMessage in case of intent failed.", + SerializedName = @"errorMessage", + PossibleTypes = new [] { typeof(string) })] + string ErrorMessage { get; set; } + /// Specifies the fabric name - Azure or AD + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the fabric name - Azure or AD", + SerializedName = @"fabricName", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName? FabricName { get; set; } + /// Specifies the policy name which is used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the policy name which is used for protection", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; set; } + /// Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname.", + SerializedName = @"protectedItemName", + PossibleTypes = new [] { typeof(string) })] + string ProtectedItemName { get; set; } + /// Number of protected items + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of protected items", + SerializedName = @"protectedItemsCount", + PossibleTypes = new [] { typeof(int) })] + int? ProtectedItemsCount { get; set; } + /// Specifies whether the container is registered or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the container is registered or not", + SerializedName = @"protectionStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionStatus { get; set; } + /// Container registration status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Container registration status", + SerializedName = @"registrationStatus", + PossibleTypes = new [] { typeof(string) })] + string RegistrationStatus { get; set; } + /// Specifies the arm resource id of the vault + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the arm resource id of the vault", + SerializedName = @"vaultId", + PossibleTypes = new [] { typeof(string) })] + string VaultId { get; set; } + + } + /// BackupStatus response. + internal partial interface IBackupStatusResponseInternal + + { + /// Specifies whether the storage account lock has been acquired or not + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock? AcquireStorageAccountLock { get; set; } + /// + /// Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. + /// + string ContainerName { get; set; } + /// ErrorCode in case of intent failed + string ErrorCode { get; set; } + /// ErrorMessage in case of intent failed. + string ErrorMessage { get; set; } + /// Specifies the fabric name - Azure or AD + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName? FabricName { get; set; } + /// Specifies the policy name which is used for protection + string PolicyName { get; set; } + /// Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. + string ProtectedItemName { get; set; } + /// Number of protected items + int? ProtectedItemsCount { get; set; } + /// Specifies whether the container is registered or not + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionStatus { get; set; } + /// Container registration status + string RegistrationStatus { get; set; } + /// Specifies the arm resource id of the vault + string VaultId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusResponse.json.cs new file mode 100644 index 000000000000..6ee37e8c1994 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BackupStatusResponse.json.cs @@ -0,0 +1,128 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// BackupStatus response. + public partial class BackupStatusResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BackupStatusResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_protectionStatus = If( json?.PropertyT("protectionStatus"), out var __jsonProtectionStatus) ? (string)__jsonProtectionStatus : (string)ProtectionStatus;} + {_vaultId = If( json?.PropertyT("vaultId"), out var __jsonVaultId) ? (string)__jsonVaultId : (string)VaultId;} + {_fabricName = If( json?.PropertyT("fabricName"), out var __jsonFabricName) ? (string)__jsonFabricName : (string)FabricName;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_protectedItemName = If( json?.PropertyT("protectedItemName"), out var __jsonProtectedItemName) ? (string)__jsonProtectedItemName : (string)ProtectedItemName;} + {_errorCode = If( json?.PropertyT("errorCode"), out var __jsonErrorCode) ? (string)__jsonErrorCode : (string)ErrorCode;} + {_errorMessage = If( json?.PropertyT("errorMessage"), out var __jsonErrorMessage) ? (string)__jsonErrorMessage : (string)ErrorMessage;} + {_policyName = If( json?.PropertyT("policyName"), out var __jsonPolicyName) ? (string)__jsonPolicyName : (string)PolicyName;} + {_registrationStatus = If( json?.PropertyT("registrationStatus"), out var __jsonRegistrationStatus) ? (string)__jsonRegistrationStatus : (string)RegistrationStatus;} + {_protectedItemsCount = If( json?.PropertyT("protectedItemsCount"), out var __jsonProtectedItemsCount) ? (int?)__jsonProtectedItemsCount : ProtectedItemsCount;} + {_acquireStorageAccountLock = If( json?.PropertyT("acquireStorageAccountLock"), out var __jsonAcquireStorageAccountLock) ? (string)__jsonAcquireStorageAccountLock : (string)AcquireStorageAccountLock;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BackupStatusResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._protectionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionStatus.ToString()) : null, "protectionStatus" ,container.Add ); + AddIf( null != (((object)this._vaultId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._vaultId.ToString()) : null, "vaultId" ,container.Add ); + AddIf( null != (((object)this._fabricName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fabricName.ToString()) : null, "fabricName" ,container.Add ); + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != (((object)this._protectedItemName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectedItemName.ToString()) : null, "protectedItemName" ,container.Add ); + AddIf( null != (((object)this._errorCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorCode.ToString()) : null, "errorCode" ,container.Add ); + AddIf( null != (((object)this._errorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorMessage.ToString()) : null, "errorMessage" ,container.Add ); + AddIf( null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName" ,container.Add ); + AddIf( null != (((object)this._registrationStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._registrationStatus.ToString()) : null, "registrationStatus" ,container.Add ); + AddIf( null != this._protectedItemsCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._protectedItemsCount) : null, "protectedItemsCount" ,container.Add ); + AddIf( null != (((object)this._acquireStorageAccountLock)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._acquireStorageAccountLock.ToString()) : null, "acquireStorageAccountLock" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BekDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BekDetails.cs new file mode 100644 index 000000000000..d9b7607966ff --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BekDetails.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// BEK is bitlocker encryption key. + public partial class BekDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetailsInternal + { + + /// Backing field for property. + private string _secretData; + + /// BEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SecretData { get => this._secretData; set => this._secretData = value; } + + /// Backing field for property. + private string _secretUrl; + + /// Secret is BEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SecretUrl { get => this._secretUrl; set => this._secretUrl = value; } + + /// Backing field for property. + private string _secretVaultId; + + /// ID of the Key Vault where this Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SecretVaultId { get => this._secretVaultId; set => this._secretVaultId = value; } + + /// Creates an new instance. + public BekDetails() + { + + } + } + /// BEK is bitlocker encryption key. + public partial interface IBekDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// BEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"BEK data.", + SerializedName = @"secretData", + PossibleTypes = new [] { typeof(string) })] + string SecretData { get; set; } + /// Secret is BEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Secret is BEK.", + SerializedName = @"secretUrl", + PossibleTypes = new [] { typeof(string) })] + string SecretUrl { get; set; } + /// ID of the Key Vault where this Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the Key Vault where this Secret is stored.", + SerializedName = @"secretVaultId", + PossibleTypes = new [] { typeof(string) })] + string SecretVaultId { get; set; } + + } + /// BEK is bitlocker encryption key. + internal partial interface IBekDetailsInternal + + { + /// BEK data. + string SecretData { get; set; } + /// Secret is BEK. + string SecretUrl { get; set; } + /// ID of the Key Vault where this Secret is stored. + string SecretVaultId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BekDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BekDetails.json.cs new file mode 100644 index 000000000000..4c62d4382a05 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BekDetails.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// BEK is bitlocker encryption key. + public partial class BekDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BekDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_secretUrl = If( json?.PropertyT("secretUrl"), out var __jsonSecretUrl) ? (string)__jsonSecretUrl : (string)SecretUrl;} + {_secretVaultId = If( json?.PropertyT("secretVaultId"), out var __jsonSecretVaultId) ? (string)__jsonSecretVaultId : (string)SecretVaultId;} + {_secretData = If( json?.PropertyT("secretData"), out var __jsonSecretData) ? (string)__jsonSecretData : (string)SecretData;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BekDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._secretUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._secretUrl.ToString()) : null, "secretUrl" ,container.Add ); + AddIf( null != (((object)this._secretVaultId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._secretVaultId.ToString()) : null, "secretVaultId" ,container.Add ); + AddIf( null != (((object)this._secretData)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._secretData.ToString()) : null, "secretData" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEngineQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEngineQueryObject.cs new file mode 100644 index 000000000000..c836d190b3eb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEngineQueryObject.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Query parameters to fetch list of backup engines. + public partial class BmsBackupEngineQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEngineQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEngineQueryObjectInternal + { + + /// Backing field for property. + private string _expand; + + /// attribute to add extended info + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Expand { get => this._expand; set => this._expand = value; } + + /// Creates an new instance. + public BmsBackupEngineQueryObject() + { + + } + } + /// Query parameters to fetch list of backup engines. + public partial interface IBmsBackupEngineQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// attribute to add extended info + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"attribute to add extended info", + SerializedName = @"expand", + PossibleTypes = new [] { typeof(string) })] + string Expand { get; set; } + + } + /// Query parameters to fetch list of backup engines. + internal partial interface IBmsBackupEngineQueryObjectInternal + + { + /// attribute to add extended info + string Expand { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEngineQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEngineQueryObject.json.cs new file mode 100644 index 000000000000..6af54cec2590 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEngineQueryObject.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Query parameters to fetch list of backup engines. + public partial class BmsBackupEngineQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BmsBackupEngineQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_expand = If( json?.PropertyT("expand"), out var __jsonExpand) ? (string)__jsonExpand : (string)Expand;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEngineQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEngineQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEngineQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BmsBackupEngineQueryObject(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._expand)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._expand.ToString()) : null, "expand" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEnginesQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEnginesQueryObject.cs new file mode 100644 index 000000000000..3012f434c4d7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEnginesQueryObject.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Query parameters to fetch list of backup engines. + public partial class BmsBackupEnginesQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEnginesQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEnginesQueryObjectInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Backup management type for the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private string _expand; + + /// Attribute to add extended info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Expand { get => this._expand; set => this._expand = value; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Creates an new instance. + public BmsBackupEnginesQueryObject() + { + + } + } + /// Query parameters to fetch list of backup engines. + public partial interface IBmsBackupEnginesQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup management type for the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type for the backup engine.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Attribute to add extended info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Attribute to add extended info.", + SerializedName = @"expand", + PossibleTypes = new [] { typeof(string) })] + string Expand { get; set; } + /// Friendly name of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the backup engine.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + + } + /// Query parameters to fetch list of backup engines. + internal partial interface IBmsBackupEnginesQueryObjectInternal + + { + /// Backup management type for the backup engine. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Attribute to add extended info. + string Expand { get; set; } + /// Friendly name of the backup engine. + string FriendlyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEnginesQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEnginesQueryObject.json.cs new file mode 100644 index 000000000000..d891a47b550a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupEnginesQueryObject.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Query parameters to fetch list of backup engines. + public partial class BmsBackupEnginesQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BmsBackupEnginesQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_expand = If( json?.PropertyT("expand"), out var __jsonExpand) ? (string)__jsonExpand : (string)Expand;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEnginesQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEnginesQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupEnginesQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BmsBackupEnginesQueryObject(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._expand)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._expand.ToString()) : null, "expand" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupSummariesQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupSummariesQueryObject.cs new file mode 100644 index 000000000000..36c4a0cf6176 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupSummariesQueryObject.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Query parameters to fetch backup summaries. + public partial class BmsBackupSummariesQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupSummariesQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupSummariesQueryObjectInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type? _type; + + /// Backup management type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type? Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public BmsBackupSummariesQueryObject() + { + + } + } + /// Query parameters to fetch backup summaries. + public partial interface IBmsBackupSummariesQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup management type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type for this container.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type? Type { get; set; } + + } + /// Query parameters to fetch backup summaries. + internal partial interface IBmsBackupSummariesQueryObjectInternal + + { + /// Backup management type for this container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type? Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupSummariesQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupSummariesQueryObject.json.cs new file mode 100644 index 000000000000..46ccebbdbe73 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsBackupSummariesQueryObject.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Query parameters to fetch backup summaries. + public partial class BmsBackupSummariesQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BmsBackupSummariesQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupSummariesQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupSummariesQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsBackupSummariesQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BmsBackupSummariesQueryObject(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + 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 ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainerQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainerQueryObject.cs new file mode 100644 index 000000000000..408ca905a635 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainerQueryObject.cs @@ -0,0 +1,136 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The query filters that can be used with the list containers API. + public partial class BmsContainerQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainerQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainerQueryObjectInternal + { + + /// Backing field for property. + private string _backupEngineName; + + /// Backup engine name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupEngineName { get => this._backupEngineName; set => this._backupEngineName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType _backupManagementType; + + /// Backup management type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType? _containerType; + + /// Type of container for filter + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType? ContainerType { get => this._containerType; set => this._containerType = value; } + + /// Backing field for property. + private string _fabricName; + + /// Fabric name for filter + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FabricName { get => this._fabricName; set => this._fabricName = value; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Backing field for property. + private string _status; + + /// Status of registration of this container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public BmsContainerQueryObject() + { + + } + } + /// The query filters that can be used with the list containers API. + public partial interface IBmsContainerQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup engine name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup engine name", + SerializedName = @"backupEngineName", + PossibleTypes = new [] { typeof(string) })] + string BackupEngineName { get; set; } + /// Backup management type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Backup management type for this container.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType BackupManagementType { get; set; } + /// Type of container for filter + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of container for filter", + SerializedName = @"containerType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType? ContainerType { get; set; } + /// Fabric name for filter + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fabric name for filter", + SerializedName = @"fabricName", + PossibleTypes = new [] { typeof(string) })] + string FabricName { get; set; } + /// Friendly name of this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of this container.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Status of registration of this container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of registration of this container with the Recovery Services Vault.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + + } + /// The query filters that can be used with the list containers API. + internal partial interface IBmsContainerQueryObjectInternal + + { + /// Backup engine name + string BackupEngineName { get; set; } + /// Backup management type for this container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType BackupManagementType { get; set; } + /// Type of container for filter + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType? ContainerType { get; set; } + /// Fabric name for filter + string FabricName { get; set; } + /// Friendly name of this container. + string FriendlyName { get; set; } + /// Status of registration of this container with the Recovery Services Vault. + string Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainerQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainerQueryObject.json.cs new file mode 100644 index 000000000000..689b1f406371 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainerQueryObject.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The query filters that can be used with the list containers API. + public partial class BmsContainerQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BmsContainerQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_containerType = If( json?.PropertyT("containerType"), out var __jsonContainerType) ? (string)__jsonContainerType : (string)ContainerType;} + {_backupEngineName = If( json?.PropertyT("backupEngineName"), out var __jsonBackupEngineName) ? (string)__jsonBackupEngineName : (string)BackupEngineName;} + {_fabricName = If( json?.PropertyT("fabricName"), out var __jsonFabricName) ? (string)__jsonFabricName : (string)FabricName;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainerQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainerQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainerQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BmsContainerQueryObject(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._containerType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerType.ToString()) : null, "containerType" ,container.Add ); + AddIf( null != (((object)this._backupEngineName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupEngineName.ToString()) : null, "backupEngineName" ,container.Add ); + AddIf( null != (((object)this._fabricName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fabricName.ToString()) : null, "fabricName" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainersInquiryQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainersInquiryQueryObject.cs new file mode 100644 index 000000000000..83c9def49882 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainersInquiryQueryObject.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The query filters that can be used with the inquire container API. + public partial class BmsContainersInquiryQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainersInquiryQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainersInquiryQueryObjectInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Backup management type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? _workloadType; + + /// Workload type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public BmsContainersInquiryQueryObject() + { + + } + } + /// The query filters that can be used with the inquire container API. + public partial interface IBmsContainersInquiryQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup management type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type for this container.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Workload type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload type for this container.", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } + /// The query filters that can be used with the inquire container API. + internal partial interface IBmsContainersInquiryQueryObjectInternal + + { + /// Backup management type for this container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Workload type for this container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainersInquiryQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainersInquiryQueryObject.json.cs new file mode 100644 index 000000000000..9f1c6d321165 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsContainersInquiryQueryObject.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The query filters that can be used with the inquire container API. + public partial class BmsContainersInquiryQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BmsContainersInquiryQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainersInquiryQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainersInquiryQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsContainersInquiryQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BmsContainersInquiryQueryObject(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsRefreshContainersQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsRefreshContainersQueryObject.cs new file mode 100644 index 000000000000..b1c5806e27b6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsRefreshContainersQueryObject.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The query filters that can be used with the refresh container API. + public partial class BmsRefreshContainersQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsRefreshContainersQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsRefreshContainersQueryObjectInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Backup management type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Creates an new instance. + public BmsRefreshContainersQueryObject() + { + + } + } + /// The query filters that can be used with the refresh container API. + public partial interface IBmsRefreshContainersQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup management type for this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type for this container.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + + } + /// The query filters that can be used with the refresh container API. + internal partial interface IBmsRefreshContainersQueryObjectInternal + + { + /// Backup management type for this container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsRefreshContainersQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsRefreshContainersQueryObject.json.cs new file mode 100644 index 000000000000..4d2bd09f2cca --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsRefreshContainersQueryObject.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The query filters that can be used with the refresh container API. + public partial class BmsRefreshContainersQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BmsRefreshContainersQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsRefreshContainersQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsRefreshContainersQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsRefreshContainersQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BmsRefreshContainersQueryObject(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsWorkloadItemQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsWorkloadItemQueryObject.cs new file mode 100644 index 000000000000..df25dd5a1251 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsWorkloadItemQueryObject.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list items that can be backed up. + public partial class BmsWorkloadItemQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsWorkloadItemQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsWorkloadItemQueryObjectInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Backup management type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? _protectionStatus; + + /// Backup status query parameter. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionStatus { get => this._protectionStatus; set => this._protectionStatus = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType? _workloadItemType; + + /// Workload Item type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType? WorkloadItemType { get => this._workloadItemType; set => this._workloadItemType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? _workloadType; + + /// Workload type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public BmsWorkloadItemQueryObject() + { + + } + } + /// Filters to list items that can be backed up. + public partial interface IBmsWorkloadItemQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup management type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Backup status query parameter. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup status query parameter.", + SerializedName = @"protectionStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionStatus { get; set; } + /// Workload Item type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload Item type", + SerializedName = @"workloadItemType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType? WorkloadItemType { get; set; } + /// Workload type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload type", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } + /// Filters to list items that can be backed up. + internal partial interface IBmsWorkloadItemQueryObjectInternal + + { + /// Backup management type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Backup status query parameter. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionStatus { get; set; } + /// Workload Item type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType? WorkloadItemType { get; set; } + /// Workload type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsWorkloadItemQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsWorkloadItemQueryObject.json.cs new file mode 100644 index 000000000000..736726015838 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsWorkloadItemQueryObject.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list items that can be backed up. + public partial class BmsWorkloadItemQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BmsWorkloadItemQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_workloadItemType = If( json?.PropertyT("workloadItemType"), out var __jsonWorkloadItemType) ? (string)__jsonWorkloadItemType : (string)WorkloadItemType;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + {_protectionStatus = If( json?.PropertyT("protectionStatus"), out var __jsonProtectionStatus) ? (string)__jsonProtectionStatus : (string)ProtectionStatus;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsWorkloadItemQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsWorkloadItemQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsWorkloadItemQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BmsWorkloadItemQueryObject(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._workloadItemType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadItemType.ToString()) : null, "workloadItemType" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + AddIf( null != (((object)this._protectionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionStatus.ToString()) : null, "protectionStatus" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmspoQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmspoQueryObject.cs new file mode 100644 index 000000000000..8820812f324d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmspoQueryObject.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list items that can be backed up. + public partial class BmspoQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmspoQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmspoQueryObjectInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Backup management type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private string _containerName; + + /// Full name of the container whose Protectable Objects should be returned. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Backing field for property. + private string _status; + + /// Backup status query parameter. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? _workloadType; + + /// Workload type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public BmspoQueryObject() + { + + } + } + /// Filters to list items that can be backed up. + public partial interface IBmspoQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup management type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Full name of the container whose Protectable Objects should be returned. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Full name of the container whose Protectable Objects should be returned.", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// Friendly name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Backup status query parameter. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup status query parameter.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// Workload type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload type", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } + /// Filters to list items that can be backed up. + internal partial interface IBmspoQueryObjectInternal + + { + /// Backup management type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Full name of the container whose Protectable Objects should be returned. + string ContainerName { get; set; } + /// Friendly name. + string FriendlyName { get; set; } + /// Backup status query parameter. + string Status { get; set; } + /// Workload type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmspoQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmspoQueryObject.json.cs new file mode 100644 index 000000000000..67af5df10527 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmspoQueryObject.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list items that can be backed up. + public partial class BmspoQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BmspoQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmspoQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmspoQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmspoQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BmspoQueryObject(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsrpQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsrpQueryObject.cs new file mode 100644 index 000000000000..33149d144108 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsrpQueryObject.cs @@ -0,0 +1,148 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list backup copies. + public partial class BmsrpQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsrpQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsrpQueryObjectInternal + { + + /// Backing field for property. + private global::System.DateTime? _endDate; + + /// Backup copies created before this time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? EndDate { get => this._endDate; set => this._endDate = value; } + + /// Backing field for property. + private bool? _extendedInfo; + + /// + /// In Get Recovery Point, it tells whether extended information about recovery point is asked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? ExtendedInfo { get => this._extendedInfo; set => this._extendedInfo = value; } + + /// Backing field for property. + private bool? _includeSoftDeletedRp; + + /// + /// Flag to indicate whether Soft Deleted RPs should be included/excluded from result. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IncludeSoftDeletedRp { get => this._includeSoftDeletedRp; set => this._includeSoftDeletedRp = value; } + + /// Backing field for property. + private bool? _moveReadyRpOnly; + + /// Whether the RP can be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? MoveReadyRpOnly { get => this._moveReadyRpOnly; set => this._moveReadyRpOnly = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType? _restorePointQueryType; + + /// RestorePoint type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType? RestorePointQueryType { get => this._restorePointQueryType; set => this._restorePointQueryType = value; } + + /// Backing field for property. + private global::System.DateTime? _startDate; + + /// Backup copies created after this time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? StartDate { get => this._startDate; set => this._startDate = value; } + + /// Creates an new instance. + public BmsrpQueryObject() + { + + } + } + /// Filters to list backup copies. + public partial interface IBmsrpQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup copies created before this time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup copies created before this time.", + SerializedName = @"endDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndDate { get; set; } + /// + /// In Get Recovery Point, it tells whether extended information about recovery point is asked. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"In Get Recovery Point, it tells whether extended information about recovery point is asked.", + SerializedName = @"extendedInfo", + PossibleTypes = new [] { typeof(bool) })] + bool? ExtendedInfo { get; set; } + /// + /// Flag to indicate whether Soft Deleted RPs should be included/excluded from result. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to indicate whether Soft Deleted RPs should be included/excluded from result.", + SerializedName = @"includeSoftDeletedRP", + PossibleTypes = new [] { typeof(bool) })] + bool? IncludeSoftDeletedRp { get; set; } + /// Whether the RP can be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the RP can be moved to another tier", + SerializedName = @"moveReadyRPOnly", + PossibleTypes = new [] { typeof(bool) })] + bool? MoveReadyRpOnly { get; set; } + /// RestorePoint type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"RestorePoint type", + SerializedName = @"restorePointQueryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType? RestorePointQueryType { get; set; } + /// Backup copies created after this time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup copies created after this time.", + SerializedName = @"startDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartDate { get; set; } + + } + /// Filters to list backup copies. + internal partial interface IBmsrpQueryObjectInternal + + { + /// Backup copies created before this time. + global::System.DateTime? EndDate { get; set; } + /// + /// In Get Recovery Point, it tells whether extended information about recovery point is asked. + /// + bool? ExtendedInfo { get; set; } + /// + /// Flag to indicate whether Soft Deleted RPs should be included/excluded from result. + /// + bool? IncludeSoftDeletedRp { get; set; } + /// Whether the RP can be moved to another tier + bool? MoveReadyRpOnly { get; set; } + /// RestorePoint type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType? RestorePointQueryType { get; set; } + /// Backup copies created after this time. + global::System.DateTime? StartDate { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsrpQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsrpQueryObject.json.cs new file mode 100644 index 000000000000..da8f5ed42315 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/BmsrpQueryObject.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list backup copies. + public partial class BmsrpQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal BmsrpQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_startDate = If( json?.PropertyT("startDate"), out var __jsonStartDate) ? global::System.DateTime.TryParse((string)__jsonStartDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartDateValue) ? __jsonStartDateValue : StartDate : StartDate;} + {_endDate = If( json?.PropertyT("endDate"), out var __jsonEndDate) ? global::System.DateTime.TryParse((string)__jsonEndDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndDateValue) ? __jsonEndDateValue : EndDate : EndDate;} + {_restorePointQueryType = If( json?.PropertyT("restorePointQueryType"), out var __jsonRestorePointQueryType) ? (string)__jsonRestorePointQueryType : (string)RestorePointQueryType;} + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? (bool?)__jsonExtendedInfo : ExtendedInfo;} + {_moveReadyRpOnly = If( json?.PropertyT("moveReadyRPOnly"), out var __jsonMoveReadyRpOnly) ? (bool?)__jsonMoveReadyRpOnly : MoveReadyRpOnly;} + {_includeSoftDeletedRp = If( json?.PropertyT("includeSoftDeletedRP"), out var __jsonIncludeSoftDeletedRp) ? (bool?)__jsonIncludeSoftDeletedRp : IncludeSoftDeletedRp;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsrpQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsrpQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBmsrpQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new BmsrpQueryObject(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._startDate ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._startDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startDate" ,container.Add ); + AddIf( null != this._endDate ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._endDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endDate" ,container.Add ); + AddIf( null != (((object)this._restorePointQueryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._restorePointQueryType.ToString()) : null, "restorePointQueryType" ,container.Add ); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._extendedInfo) : null, "extendedInfo" ,container.Add ); + AddIf( null != this._moveReadyRpOnly ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._moveReadyRpOnly) : null, "moveReadyRPOnly" ,container.Add ); + AddIf( null != this._includeSoftDeletedRp ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._includeSoftDeletedRp) : null, "includeSoftDeletedRP" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryDisplay.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryDisplay.cs new file mode 100644 index 000000000000..e5efc2689097 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryDisplay.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Localized display information of an operation. + public partial class ClientDiscoveryDisplay : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplay, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplayInternal + { + + /// Backing field for property. + private string _description; + + /// Description of the operation having details of what operation is about. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _operation; + + /// Operations Name itself. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Operation { get => this._operation; set => this._operation = value; } + + /// Backing field for property. + private string _provider; + + /// Name of the provider for display purposes + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Provider { get => this._provider; set => this._provider = value; } + + /// Backing field for property. + private string _resource; + + /// ResourceType for which this Operation can be performed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Resource { get => this._resource; set => this._resource = value; } + + /// Creates an new instance. + public ClientDiscoveryDisplay() + { + + } + } + /// Localized display information of an operation. + public partial interface IClientDiscoveryDisplay : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Description of the operation having details of what operation is about. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the operation having details of what operation is about.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Operations Name itself. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operations Name itself.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; set; } + /// Name of the provider for display purposes + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the provider for display purposes", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string Provider { get; set; } + /// ResourceType for which this Operation can be performed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceType for which this Operation can be performed.", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; set; } + + } + /// Localized display information of an operation. + internal partial interface IClientDiscoveryDisplayInternal + + { + /// Description of the operation having details of what operation is about. + string Description { get; set; } + /// Operations Name itself. + string Operation { get; set; } + /// Name of the provider for display purposes + string Provider { get; set; } + /// ResourceType for which this Operation can be performed. + string Resource { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryDisplay.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryDisplay.json.cs new file mode 100644 index 000000000000..b8a625357a47 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryDisplay.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Localized display information of an operation. + public partial class ClientDiscoveryDisplay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ClientDiscoveryDisplay(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ClientDiscoveryDisplay(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForLogSpecification.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForLogSpecification.cs new file mode 100644 index 000000000000..2435bca80fa9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForLogSpecification.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Class to represent shoebox log specification in json client discovery. + public partial class ClientDiscoveryForLogSpecification : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecificationInternal + { + + /// Backing field for property. + private string _blobDuration; + + /// blob duration of shoebox log specification + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BlobDuration { get => this._blobDuration; set => this._blobDuration = value; } + + /// Backing field for property. + private string _displayName; + + /// Localized display name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _name; + + /// Name for shoebox log specification. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public ClientDiscoveryForLogSpecification() + { + + } + } + /// Class to represent shoebox log specification in json client discovery. + public partial interface IClientDiscoveryForLogSpecification : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// blob duration of shoebox log specification + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"blob duration of shoebox log specification", + SerializedName = @"blobDuration", + PossibleTypes = new [] { typeof(string) })] + string BlobDuration { get; set; } + /// Localized display name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Localized display name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Name for shoebox log specification. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name for shoebox log specification.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + } + /// Class to represent shoebox log specification in json client discovery. + internal partial interface IClientDiscoveryForLogSpecificationInternal + + { + /// blob duration of shoebox log specification + string BlobDuration { get; set; } + /// Localized display name + string DisplayName { get; set; } + /// Name for shoebox log specification. + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForLogSpecification.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForLogSpecification.json.cs new file mode 100644 index 000000000000..c041dec09d32 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForLogSpecification.json.cs @@ -0,0 +1,113 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Class to represent shoebox log specification in json client discovery. + public partial class ClientDiscoveryForLogSpecification + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ClientDiscoveryForLogSpecification(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_blobDuration = If( json?.PropertyT("blobDuration"), out var __jsonBlobDuration) ? (string)__jsonBlobDuration : (string)BlobDuration;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ClientDiscoveryForLogSpecification(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._blobDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._blobDuration.ToString()) : null, "blobDuration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForProperties.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForProperties.cs new file mode 100644 index 000000000000..44bfa6b879ef --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForProperties.cs @@ -0,0 +1,60 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Class to represent shoebox properties in json client discovery. + public partial class ClientDiscoveryForProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForProperties, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForPropertiesInternal + { + + /// Internal Acessors for ServiceSpecification + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForPropertiesInternal.ServiceSpecification { get => (this._serviceSpecification = this._serviceSpecification ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryForServiceSpecification()); set { {_serviceSpecification = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification _serviceSpecification; + + /// Operation properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification ServiceSpecification { get => (this._serviceSpecification = this._serviceSpecification ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryForServiceSpecification()); set => this._serviceSpecification = value; } + + /// List of log specifications of this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] ServiceSpecificationLogSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecificationInternal)ServiceSpecification).LogSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecificationInternal)ServiceSpecification).LogSpecification = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public ClientDiscoveryForProperties() + { + + } + } + /// Class to represent shoebox properties in json client discovery. + public partial interface IClientDiscoveryForProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of log specifications of this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of log specifications of this operation.", + SerializedName = @"logSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] ServiceSpecificationLogSpecification { get; set; } + + } + /// Class to represent shoebox properties in json client discovery. + internal partial interface IClientDiscoveryForPropertiesInternal + + { + /// Operation properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification ServiceSpecification { get; set; } + /// List of log specifications of this operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] ServiceSpecificationLogSpecification { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForProperties.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForProperties.json.cs new file mode 100644 index 000000000000..b0cf3c665b70 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForProperties.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Class to represent shoebox properties in json client discovery. + public partial class ClientDiscoveryForProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ClientDiscoveryForProperties(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_serviceSpecification = If( json?.PropertyT("serviceSpecification"), out var __jsonServiceSpecification) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryForServiceSpecification.FromJson(__jsonServiceSpecification) : ServiceSpecification;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ClientDiscoveryForProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._serviceSpecification ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._serviceSpecification.ToJson(null,serializationMode) : null, "serviceSpecification" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForServiceSpecification.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForServiceSpecification.cs new file mode 100644 index 000000000000..cf5d0ffdb25e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForServiceSpecification.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Class to represent shoebox service specification in json client discovery. + public partial class ClientDiscoveryForServiceSpecification : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecificationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] _logSpecification; + + /// List of log specifications of this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] LogSpecification { get => this._logSpecification; set => this._logSpecification = value; } + + /// Creates an new instance. + public ClientDiscoveryForServiceSpecification() + { + + } + } + /// Class to represent shoebox service specification in json client discovery. + public partial interface IClientDiscoveryForServiceSpecification : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of log specifications of this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of log specifications of this operation.", + SerializedName = @"logSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] LogSpecification { get; set; } + + } + /// Class to represent shoebox service specification in json client discovery. + internal partial interface IClientDiscoveryForServiceSpecificationInternal + + { + /// List of log specifications of this operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] LogSpecification { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForServiceSpecification.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForServiceSpecification.json.cs new file mode 100644 index 000000000000..42c4534fa0fc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryForServiceSpecification.json.cs @@ -0,0 +1,117 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Class to represent shoebox service specification in json client discovery. + public partial class ClientDiscoveryForServiceSpecification + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ClientDiscoveryForServiceSpecification(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_logSpecification = If( json?.PropertyT("logSpecifications"), out var __jsonLogSpecifications) ? If( __jsonLogSpecifications as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryForLogSpecification.FromJson(__u) )) ))() : null : LogSpecification;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ClientDiscoveryForServiceSpecification(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._logSpecification) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._logSpecification ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("logSpecifications",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryResponse.cs new file mode 100644 index 000000000000..77aa43855d43 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryResponse.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operations List response which contains list of available APIs. + public partial class ClientDiscoveryResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryResponseInternal + { + + /// Backing field for property. + private string _nextLink; + + /// Link to the next chunk of Response. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi[] _value; + + /// List of available operations. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ClientDiscoveryResponse() + { + + } + } + /// Operations List response which contains list of available APIs. + public partial interface IClientDiscoveryResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Link to the next chunk of Response. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Link to the next chunk of Response.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of available operations. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of available operations.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi[] Value { get; set; } + + } + /// Operations List response which contains list of available APIs. + internal partial interface IClientDiscoveryResponseInternal + + { + /// Link to the next chunk of Response. + string NextLink { get; set; } + /// List of available operations. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryResponse.json.cs new file mode 100644 index 000000000000..326689394815 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryResponse.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operations List response which contains list of available APIs. + public partial class ClientDiscoveryResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ClientDiscoveryResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryValueForSingleApi.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ClientDiscoveryResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryValueForSingleApi.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryValueForSingleApi.cs new file mode 100644 index 000000000000..919daa6f8f32 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryValueForSingleApi.cs @@ -0,0 +1,173 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Available operation details. + public partial class ClientDiscoveryValueForSingleApi : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApiInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplay _display; + + /// Contains the localized display information for this particular operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryDisplay()); set => this._display = value; } + + /// Description of the operation having details of what operation is about. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplayInternal)Display).Description = value ?? null; } + + /// Operations Name itself. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplayInternal)Display).Operation = value ?? null; } + + /// Name of the provider for display purposes + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplayInternal)Display).Provider = value ?? null; } + + /// ResourceType for which this Operation can be performed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplayInternal)Display).Resource = value ?? null; } + + /// Internal Acessors for Display + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplay Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApiInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryDisplay()); set { {_display = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApiInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryForProperties()); set { {_property = value;} } } + + /// Internal Acessors for ServiceSpecification + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApiInternal.ServiceSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForPropertiesInternal)Property).ServiceSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForPropertiesInternal)Property).ServiceSpecification = value; } + + /// Backing field for property. + private string _name; + + /// Name of the Operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _origin; + + /// + /// The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Origin { get => this._origin; set => this._origin = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForProperties _property; + + /// ShoeBox properties for the given operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryForProperties()); set => this._property = value; } + + /// List of log specifications of this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] ServiceSpecificationLogSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForPropertiesInternal)Property).ServiceSpecificationLogSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForPropertiesInternal)Property).ServiceSpecificationLogSpecification = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public ClientDiscoveryValueForSingleApi() + { + + } + } + /// Available operation details. + public partial interface IClientDiscoveryValueForSingleApi : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Description of the operation having details of what operation is about. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the operation having details of what operation is about.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; set; } + /// Operations Name itself. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operations Name itself.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string DisplayOperation { get; set; } + /// Name of the provider for display purposes + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the provider for display purposes", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string DisplayProvider { get; set; } + /// ResourceType for which this Operation can be performed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceType for which this Operation can be performed.", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string DisplayResource { get; set; } + /// Name of the Operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Operation.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX", + SerializedName = @"origin", + PossibleTypes = new [] { typeof(string) })] + string Origin { get; set; } + /// List of log specifications of this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of log specifications of this operation.", + SerializedName = @"logSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] ServiceSpecificationLogSpecification { get; set; } + + } + /// Available operation details. + internal partial interface IClientDiscoveryValueForSingleApiInternal + + { + /// Contains the localized display information for this particular operation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryDisplay Display { get; set; } + /// Description of the operation having details of what operation is about. + string DisplayDescription { get; set; } + /// Operations Name itself. + string DisplayOperation { get; set; } + /// Name of the provider for display purposes + string DisplayProvider { get; set; } + /// ResourceType for which this Operation can be performed. + string DisplayResource { get; set; } + /// Name of the Operation. + string Name { get; set; } + /// + /// The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX + /// + string Origin { get; set; } + /// ShoeBox properties for the given operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForProperties Property { get; set; } + /// Operation properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForServiceSpecification ServiceSpecification { get; set; } + /// List of log specifications of this operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryForLogSpecification[] ServiceSpecificationLogSpecification { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryValueForSingleApi.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryValueForSingleApi.json.cs new file mode 100644 index 000000000000..e9127d96f25d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientDiscoveryValueForSingleApi.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Available operation details. + public partial class ClientDiscoveryValueForSingleApi + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ClientDiscoveryValueForSingleApi(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryDisplay.FromJson(__jsonDisplay) : Display;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryForProperties.FromJson(__jsonProperties) : Property;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientDiscoveryValueForSingleApi FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ClientDiscoveryValueForSingleApi(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientScriptForConnect.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientScriptForConnect.cs new file mode 100644 index 000000000000..b5e5df0c5d35 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientScriptForConnect.cs @@ -0,0 +1,147 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Client script details for file / folder restore. + public partial class ClientScriptForConnect : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnectInternal + { + + /// Backing field for property. + private string _oSType; + + /// + /// OS type - Windows, Linux etc. for which this file / folder restore client script works. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string OSType { get => this._oSType; set => this._oSType = value; } + + /// Backing field for property. + private string _scriptContent; + + /// File content of the client script for file / folder restore. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ScriptContent { get => this._scriptContent; set => this._scriptContent = value; } + + /// Backing field for property. + private string _scriptExtension; + + /// + /// File extension of the client script for file / folder restore - .ps1 , .sh , etc. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ScriptExtension { get => this._scriptExtension; set => this._scriptExtension = value; } + + /// Backing field for property. + private string _scriptNameSuffix; + + /// + /// Mandatory suffix that should be added to the name of script that is given for download to user. + /// If its null or empty then , ignore it. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ScriptNameSuffix { get => this._scriptNameSuffix; set => this._scriptNameSuffix = value; } + + /// Backing field for property. + private string _url; + + /// + /// URL of Executable from where to source the content. If this is not null then ScriptContent should not be used + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Url { get => this._url; set => this._url = value; } + + /// Creates an new instance. + public ClientScriptForConnect() + { + + } + } + /// Client script details for file / folder restore. + public partial interface IClientScriptForConnect : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// OS type - Windows, Linux etc. for which this file / folder restore client script works. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"OS type - Windows, Linux etc. for which this file / folder restore client script works.", + SerializedName = @"osType", + PossibleTypes = new [] { typeof(string) })] + string OSType { get; set; } + /// File content of the client script for file / folder restore. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"File content of the client script for file / folder restore.", + SerializedName = @"scriptContent", + PossibleTypes = new [] { typeof(string) })] + string ScriptContent { get; set; } + /// + /// File extension of the client script for file / folder restore - .ps1 , .sh , etc. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"File extension of the client script for file / folder restore - .ps1 , .sh , etc.", + SerializedName = @"scriptExtension", + PossibleTypes = new [] { typeof(string) })] + string ScriptExtension { get; set; } + /// + /// Mandatory suffix that should be added to the name of script that is given for download to user. + /// If its null or empty then , ignore it. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Mandatory suffix that should be added to the name of script that is given for download to user. + If its null or empty then , ignore it.", + SerializedName = @"scriptNameSuffix", + PossibleTypes = new [] { typeof(string) })] + string ScriptNameSuffix { get; set; } + /// + /// URL of Executable from where to source the content. If this is not null then ScriptContent should not be used + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL of Executable from where to source the content. If this is not null then ScriptContent should not be used", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string Url { get; set; } + + } + /// Client script details for file / folder restore. + internal partial interface IClientScriptForConnectInternal + + { + /// + /// OS type - Windows, Linux etc. for which this file / folder restore client script works. + /// + string OSType { get; set; } + /// File content of the client script for file / folder restore. + string ScriptContent { get; set; } + /// + /// File extension of the client script for file / folder restore - .ps1 , .sh , etc. + /// + string ScriptExtension { get; set; } + /// + /// Mandatory suffix that should be added to the name of script that is given for download to user. + /// If its null or empty then , ignore it. + /// + string ScriptNameSuffix { get; set; } + /// + /// URL of Executable from where to source the content. If this is not null then ScriptContent should not be used + /// + string Url { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientScriptForConnect.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientScriptForConnect.json.cs new file mode 100644 index 000000000000..987d7b2c765e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ClientScriptForConnect.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Client script details for file / folder restore. + public partial class ClientScriptForConnect + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ClientScriptForConnect(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_scriptContent = If( json?.PropertyT("scriptContent"), out var __jsonScriptContent) ? (string)__jsonScriptContent : (string)ScriptContent;} + {_scriptExtension = If( json?.PropertyT("scriptExtension"), out var __jsonScriptExtension) ? (string)__jsonScriptExtension : (string)ScriptExtension;} + {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} + {_scriptNameSuffix = If( json?.PropertyT("scriptNameSuffix"), out var __jsonScriptNameSuffix) ? (string)__jsonScriptNameSuffix : (string)ScriptNameSuffix;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ClientScriptForConnect(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._scriptContent)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._scriptContent.ToString()) : null, "scriptContent" ,container.Add ); + AddIf( null != (((object)this._scriptExtension)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._scriptExtension.ToString()) : null, "scriptExtension" ,container.Add ); + AddIf( null != (((object)this._oSType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oSType.ToString()) : null, "osType" ,container.Add ); + AddIf( null != (((object)this._url)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._url.ToString()) : null, "url" ,container.Add ); + AddIf( null != (((object)this._scriptNameSuffix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._scriptNameSuffix.ToString()) : null, "scriptNameSuffix" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudError.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudError.cs new file mode 100644 index 000000000000..786613708cce --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudError.cs @@ -0,0 +1,149 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// An error response from the Container Instance service. + public partial class CloudError : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudError, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).AdditionalInfo; } + + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Code; } + + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudErrorBody()); set => this._error = value; } + + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudErrorBody()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Target = value; } + + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal)Error).Target; } + + /// Creates an new instance. + public CloudError() + { + + } + } + /// An error response from the Container Instance service. + public partial interface ICloudError : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody[] Detail { get; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A message describing the error, intended to be suitable for display in a user interface.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The target of the particular error. For example, the name of the property in error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// An error response from the Container Instance service. + internal partial interface ICloudErrorInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + string Code { get; set; } + /// A list of additional details about the error. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody[] Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody Error { get; set; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + string Message { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudError.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudError.json.cs new file mode 100644 index 000000000000..09ef7b95193f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudError.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// An error response from the Container Instance service. + public partial class CloudError + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal CloudError(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudErrorBody.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudError. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudError. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudError FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new CloudError(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudErrorBody.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudErrorBody.cs new file mode 100644 index 000000000000..58ee8df4c447 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudErrorBody.cs @@ -0,0 +1,152 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// An error response from the Container Instance service. + public partial class CloudErrorBody : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody[] _detail; + + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody[] Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBodyInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public CloudErrorBody() + { + + } + } + /// An error response from the Container Instance service. + public partial interface ICloudErrorBody : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody[] Detail { get; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A message describing the error, intended to be suitable for display in a user interface.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The target of the particular error. For example, the name of the property in error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// An error response from the Container Instance service. + internal partial interface ICloudErrorBodyInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// + string Code { get; set; } + /// A list of additional details about the error. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody[] Detail { get; set; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + string Message { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudErrorBody.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudErrorBody.json.cs new file mode 100644 index 000000000000..36bf2da15440 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/CloudErrorBody.json.cs @@ -0,0 +1,147 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// An error response from the Container Instance service. + public partial class CloudErrorBody + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal CloudErrorBody(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudErrorBody.FromJson(__u) )) ))() : null : Detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ICloudErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new CloudErrorBody(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ContainerIdentityInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ContainerIdentityInfo.cs new file mode 100644 index 000000000000..42c648facb63 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ContainerIdentityInfo.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container identity information + public partial class ContainerIdentityInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfoInternal + { + + /// Backing field for property. + private string _aadTenantId; + + /// Protection container identity - AAD Tenant + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AadTenantId { get => this._aadTenantId; set => this._aadTenantId = value; } + + /// Backing field for property. + private string _audience; + + /// Protection container identity - Audience + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Audience { get => this._audience; set => this._audience = value; } + + /// Backing field for property. + private string _servicePrincipalClientId; + + /// Protection container identity - AAD Service Principal + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ServicePrincipalClientId { get => this._servicePrincipalClientId; set => this._servicePrincipalClientId = value; } + + /// Backing field for property. + private string _uniqueName; + + /// Unique name of the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string UniqueName { get => this._uniqueName; set => this._uniqueName = value; } + + /// Creates an new instance. + public ContainerIdentityInfo() + { + + } + } + /// Container identity information + public partial interface IContainerIdentityInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Protection container identity - AAD Tenant + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection container identity - AAD Tenant", + SerializedName = @"aadTenantId", + PossibleTypes = new [] { typeof(string) })] + string AadTenantId { get; set; } + /// Protection container identity - Audience + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection container identity - Audience", + SerializedName = @"audience", + PossibleTypes = new [] { typeof(string) })] + string Audience { get; set; } + /// Protection container identity - AAD Service Principal + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection container identity - AAD Service Principal", + SerializedName = @"servicePrincipalClientId", + PossibleTypes = new [] { typeof(string) })] + string ServicePrincipalClientId { get; set; } + /// Unique name of the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Unique name of the container", + SerializedName = @"uniqueName", + PossibleTypes = new [] { typeof(string) })] + string UniqueName { get; set; } + + } + /// Container identity information + internal partial interface IContainerIdentityInfoInternal + + { + /// Protection container identity - AAD Tenant + string AadTenantId { get; set; } + /// Protection container identity - Audience + string Audience { get; set; } + /// Protection container identity - AAD Service Principal + string ServicePrincipalClientId { get; set; } + /// Unique name of the container + string UniqueName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ContainerIdentityInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ContainerIdentityInfo.json.cs new file mode 100644 index 000000000000..f41d2add8a67 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ContainerIdentityInfo.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container identity information + public partial class ContainerIdentityInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ContainerIdentityInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_uniqueName = If( json?.PropertyT("uniqueName"), out var __jsonUniqueName) ? (string)__jsonUniqueName : (string)UniqueName;} + {_aadTenantId = If( json?.PropertyT("aadTenantId"), out var __jsonAadTenantId) ? (string)__jsonAadTenantId : (string)AadTenantId;} + {_servicePrincipalClientId = If( json?.PropertyT("servicePrincipalClientId"), out var __jsonServicePrincipalClientId) ? (string)__jsonServicePrincipalClientId : (string)ServicePrincipalClientId;} + {_audience = If( json?.PropertyT("audience"), out var __jsonAudience) ? (string)__jsonAudience : (string)Audience;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ContainerIdentityInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._uniqueName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._uniqueName.ToString()) : null, "uniqueName" ,container.Add ); + AddIf( null != (((object)this._aadTenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._aadTenantId.ToString()) : null, "aadTenantId" ,container.Add ); + AddIf( null != (((object)this._servicePrincipalClientId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._servicePrincipalClientId.ToString()) : null, "servicePrincipalClientId" ,container.Add ); + AddIf( null != (((object)this._audience)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._audience.ToString()) : null, "audience" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionFormat.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionFormat.cs new file mode 100644 index 000000000000..b86243dd5c0a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionFormat.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Daily retention format. + public partial class DailyRetentionFormat : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormatInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] _daysOfTheMonth; + + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] DaysOfTheMonth { get => this._daysOfTheMonth; set => this._daysOfTheMonth = value; } + + /// Creates an new instance. + public DailyRetentionFormat() + { + + } + } + /// Daily retention format. + public partial interface IDailyRetentionFormat : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the month.", + SerializedName = @"daysOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] DaysOfTheMonth { get; set; } + + } + /// Daily retention format. + internal partial interface IDailyRetentionFormatInternal + + { + /// List of days of the month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] DaysOfTheMonth { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionFormat.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionFormat.json.cs new file mode 100644 index 000000000000..93b613b7b118 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionFormat.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Daily retention format. + public partial class DailyRetentionFormat + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DailyRetentionFormat(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_daysOfTheMonth = If( json?.PropertyT("daysOfTheMonth"), out var __jsonDaysOfTheMonth) ? If( __jsonDaysOfTheMonth as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Day.FromJson(__u) )) ))() : null : DaysOfTheMonth;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DailyRetentionFormat(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._daysOfTheMonth) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._daysOfTheMonth ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("daysOfTheMonth",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionSchedule.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionSchedule.cs new file mode 100644 index 000000000000..8a5357f5fa4e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionSchedule.cs @@ -0,0 +1,101 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Daily retention schedule. + public partial class DailyRetentionSchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionSchedule, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal + { + + /// Internal Acessors for RetentionDuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal.RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set { {_retentionDuration = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration _retentionDuration; + + /// Retention duration of retention Policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set => this._retentionDuration = value; } + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? RetentionDurationCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count = value ?? default(int); } + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType)""); } + + /// Backing field for property. + private global::System.DateTime[] _retentionTime; + + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime[] RetentionTime { get => this._retentionTime; set => this._retentionTime = value; } + + /// Creates an new instance. + public DailyRetentionSchedule() + { + + } + } + /// Daily retention schedule. + public partial interface IDailyRetentionSchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention times of retention policy.", + SerializedName = @"retentionTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] RetentionTime { get; set; } + + } + /// Daily retention schedule. + internal partial interface IDailyRetentionScheduleInternal + + { + /// Retention duration of retention Policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + /// Retention times of retention policy. + global::System.DateTime[] RetentionTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionSchedule.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionSchedule.json.cs new file mode 100644 index 000000000000..5698a8305aa3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailyRetentionSchedule.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Daily retention schedule. + public partial class DailyRetentionSchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DailyRetentionSchedule(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_retentionDuration = If( json?.PropertyT("retentionDuration"), out var __jsonRetentionDuration) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration.FromJson(__jsonRetentionDuration) : RetentionDuration;} + {_retentionTime = If( json?.PropertyT("retentionTimes"), out var __jsonRetentionTimes) ? If( __jsonRetentionTimes as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(global::System.DateTime) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? global::System.DateTime.TryParse((string)__t, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __tValue) ? __tValue : default(global::System.DateTime) : default(global::System.DateTime))) ))() : null : RetentionTime;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionSchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionSchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionSchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DailyRetentionSchedule(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._retentionDuration ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionDuration.ToJson(null,serializationMode) : null, "retentionDuration" ,container.Add ); + if (null != this._retentionTime) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._retentionTime ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) ,__w.Add); + } + container.Add("retentionTimes",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailySchedule.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailySchedule.cs new file mode 100644 index 000000000000..a7da77e1e364 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailySchedule.cs @@ -0,0 +1,48 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class DailySchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailySchedule, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyScheduleInternal + { + + /// Backing field for property. + private global::System.DateTime[] _scheduleRunTime; + + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime[] ScheduleRunTime { get => this._scheduleRunTime; set => this._scheduleRunTime = value; } + + /// Creates an new instance. + public DailySchedule() + { + + } + } + public partial interface IDailySchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of times of day this schedule has to be run.", + SerializedName = @"scheduleRunTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] ScheduleRunTime { get; set; } + + } + internal partial interface IDailyScheduleInternal + + { + /// List of times of day this schedule has to be run. + global::System.DateTime[] ScheduleRunTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailySchedule.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailySchedule.json.cs new file mode 100644 index 000000000000..6be88e9686ff --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DailySchedule.json.cs @@ -0,0 +1,115 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class DailySchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DailySchedule(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_scheduleRunTime = If( json?.PropertyT("scheduleRunTimes"), out var __jsonScheduleRunTimes) ? If( __jsonScheduleRunTimes as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(global::System.DateTime) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? global::System.DateTime.TryParse((string)__t, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __tValue) ? __tValue : default(global::System.DateTime) : default(global::System.DateTime))) ))() : null : ScheduleRunTime;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailySchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailySchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailySchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DailySchedule(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._scheduleRunTime) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._scheduleRunTime ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) ,__w.Add); + } + container.Add("scheduleRunTimes",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Day.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Day.cs new file mode 100644 index 000000000000..4535fb90f560 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Day.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Day of the week. + public partial class Day : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDayInternal + { + + /// Backing field for property. + private int? _date; + + /// Date of the month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Date { get => this._date; set => this._date = value; } + + /// Backing field for property. + private bool? _isLast; + + /// Whether Date is last date of month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsLast { get => this._isLast; set => this._isLast = value; } + + /// Creates an new instance. + public Day() + { + + } + } + /// Day of the week. + public partial interface IDay : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Date of the month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Date of the month", + SerializedName = @"date", + PossibleTypes = new [] { typeof(int) })] + int? Date { get; set; } + /// Whether Date is last date of month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether Date is last date of month", + SerializedName = @"isLast", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLast { get; set; } + + } + /// Day of the week. + internal partial interface IDayInternal + + { + /// Date of the month + int? Date { get; set; } + /// Whether Date is last date of month + bool? IsLast { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Day.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Day.json.cs new file mode 100644 index 000000000000..06d9f200fe1b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Day.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Day of the week. + public partial class Day + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal Day(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_date = If( json?.PropertyT("date"), out var __jsonDate) ? (int?)__jsonDate : Date;} + {_isLast = If( json?.PropertyT("isLast"), out var __jsonIsLast) ? (bool?)__jsonIsLast : IsLast;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new Day(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._date ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._date) : null, "date" ,container.Add ); + AddIf( null != this._isLast ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isLast) : null, "isLast" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskExclusionProperties.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskExclusionProperties.cs new file mode 100644 index 000000000000..526c8a6db10c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskExclusionProperties.cs @@ -0,0 +1,65 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class DiskExclusionProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionPropertiesInternal + { + + /// Backing field for property. + private int[] _diskLunList; + + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int[] DiskLunList { get => this._diskLunList; set => this._diskLunList = value; } + + /// Backing field for property. + private bool? _isInclusionList; + + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsInclusionList { get => this._isInclusionList; set => this._isInclusionList = value; } + + /// Creates an new instance. + public DiskExclusionProperties() + { + + } + } + public partial interface IDiskExclusionProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection.", + SerializedName = @"diskLunList", + PossibleTypes = new [] { typeof(int) })] + int[] DiskLunList { get; set; } + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to indicate whether DiskLunList is to be included/ excluded from backup.", + SerializedName = @"isInclusionList", + PossibleTypes = new [] { typeof(bool) })] + bool? IsInclusionList { get; set; } + + } + internal partial interface IDiskExclusionPropertiesInternal + + { + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + int[] DiskLunList { get; set; } + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + bool? IsInclusionList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskExclusionProperties.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskExclusionProperties.json.cs new file mode 100644 index 000000000000..ec5b6fbc2895 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskExclusionProperties.json.cs @@ -0,0 +1,117 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class DiskExclusionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DiskExclusionProperties(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_diskLunList = If( json?.PropertyT("diskLunList"), out var __jsonDiskLunList) ? If( __jsonDiskLunList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(int) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber __t ? (int)__t : default(int))) ))() : null : DiskLunList;} + {_isInclusionList = If( json?.PropertyT("isInclusionList"), out var __jsonIsInclusionList) ? (bool?)__jsonIsInclusionList : IsInclusionList;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DiskExclusionProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._diskLunList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._diskLunList ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber(__x) ,__w.Add); + } + container.Add("diskLunList",__w); + } + AddIf( null != this._isInclusionList ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isInclusionList) : null, "isInclusionList" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskInformation.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskInformation.cs new file mode 100644 index 000000000000..3ffe79572703 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskInformation.cs @@ -0,0 +1,64 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Disk information + public partial class DiskInformation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformationInternal + { + + /// Backing field for property. + private int? _lun; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Lun { get => this._lun; set => this._lun = value; } + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public DiskInformation() + { + + } + } + /// Disk information + public partial interface IDiskInformation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"lun", + PossibleTypes = new [] { typeof(int) })] + int? Lun { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + } + /// Disk information + internal partial interface IDiskInformationInternal + + { + int? Lun { get; set; } + + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskInformation.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskInformation.json.cs new file mode 100644 index 000000000000..a39fd12eb5b8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DiskInformation.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Disk information + public partial class DiskInformation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DiskInformation(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_lun = If( json?.PropertyT("lun"), out var __jsonLun) ? (int?)__jsonLun : Lun;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DiskInformation(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._lun ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._lun) : null, "lun" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DistributedNodesInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DistributedNodesInfo.cs new file mode 100644 index 000000000000..da68e46994cb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DistributedNodesInfo.cs @@ -0,0 +1,158 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// This is used to represent the various nodes of the distributed container. + public partial class DistributedNodesInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail _errorDetail; + + /// Error Details if the Status is non-success. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail()); set => this._errorDetail = value; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Code; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Message; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Recommendation; } + + /// Internal Acessors for ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfoInternal.ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail()); set { {_errorDetail = value;} } } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfoInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Code = value; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfoInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Message = value; } + + /// Internal Acessors for ErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfoInternal.ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Recommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Recommendation = value; } + + /// Backing field for property. + private string _nodeName; + + /// Name of the node under a distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string NodeName { get => this._nodeName; set => this._nodeName = value; } + + /// Backing field for property. + private string _sourceResourceId; + + /// ARM resource id of the node + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Backing field for property. + private string _status; + + /// + /// Status of this Node. + /// Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public DistributedNodesInfo() + { + + } + } + /// This is used to represent the various nodes of the distributed container. + public partial interface IDistributedNodesInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; } + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Message related to the Code.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; } + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of recommendation strings.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] ErrorDetailRecommendation { get; } + /// Name of the node under a distributed container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the node under a distributed container.", + SerializedName = @"nodeName", + PossibleTypes = new [] { typeof(string) })] + string NodeName { get; set; } + /// ARM resource id of the node + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM resource id of the node", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + /// + /// Status of this Node. + /// Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of this Node. + Failed | Succeeded", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + + } + /// This is used to represent the various nodes of the distributed container. + internal partial interface IDistributedNodesInfoInternal + + { + /// Error Details if the Status is non-success. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail ErrorDetail { get; set; } + /// Error code. + string ErrorDetailCode { get; set; } + /// Error Message related to the Code. + string ErrorDetailMessage { get; set; } + /// List of recommendation strings. + string[] ErrorDetailRecommendation { get; set; } + /// Name of the node under a distributed container. + string NodeName { get; set; } + /// ARM resource id of the node + string SourceResourceId { get; set; } + /// + /// Status of this Node. + /// Failed | Succeeded + /// + string Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DistributedNodesInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DistributedNodesInfo.json.cs new file mode 100644 index 000000000000..38bfce1bc495 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DistributedNodesInfo.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// This is used to represent the various nodes of the distributed container. + public partial class DistributedNodesInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DistributedNodesInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorDetail = If( json?.PropertyT("errorDetail"), out var __jsonErrorDetail) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail.FromJson(__jsonErrorDetail) : ErrorDetail;} + {_nodeName = If( json?.PropertyT("nodeName"), out var __jsonNodeName) ? (string)__jsonNodeName : (string)NodeName;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDistributedNodesInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DistributedNodesInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._errorDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._errorDetail.ToJson(null,serializationMode) : null, "errorDetail" ,container.Add ); + AddIf( null != (((object)this._nodeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._nodeName.ToString()) : null, "nodeName" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmBackupEngine.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmBackupEngine.cs new file mode 100644 index 000000000000..7f08c0e539f0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmBackupEngine.cs @@ -0,0 +1,139 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Data Protection Manager (DPM) specific backup engine. + public partial class DpmBackupEngine : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmBackupEngine, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmBackupEngineInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase __backupEngineBase = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBase(); + + /// Backup agent version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string AzureBackupAgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).AzureBackupAgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).AzureBackupAgentVersion = value ?? null; } + + /// ID of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupEngineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineId = value ?? null; } + + /// + /// Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupEngineState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineState = value ?? null; } + + /// Type of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType BackupEngineType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupEngineType = value ; } + + /// Type of backup management for the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Flag indicating if the backup engine be registered, once already registered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? CanReRegister { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).CanReRegister; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).CanReRegister = value ?? default(bool); } + + /// Backup engine version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DpmVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).DpmVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).DpmVersion = value ?? null; } + + /// Extended info of the backupengine + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfo = value ?? null /* model class */; } + + /// Disk space currently available in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public double? ExtendedInfoAvailableDiskSpace { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoAvailableDiskSpace; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoAvailableDiskSpace = value ?? default(double); } + + /// Protected instances in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoAzureProtectedInstance { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoAzureProtectedInstance; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoAzureProtectedInstance = value ?? default(int); } + + /// Database name of backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedInfoDatabaseName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoDatabaseName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoDatabaseName = value ?? null; } + + /// Number of disks in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoDiskCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoDiskCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoDiskCount = value ?? default(int); } + + /// Number of protected items in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoProtectedItemsCount = value ?? default(int); } + + /// Number of protected servers in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ExtendedInfoProtectedServersCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoProtectedServersCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoProtectedServersCount = value ?? default(int); } + + /// Last refresh time in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? ExtendedInfoRefreshedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoRefreshedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoRefreshedAt = value ?? default(global::System.DateTime); } + + /// Disk space used in the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public double? ExtendedInfoUsedDiskSpace { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoUsedDiskSpace; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).ExtendedInfoUsedDiskSpace = value ?? default(double); } + + /// Friendly name of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).FriendlyName = value ?? null; } + + /// Backup status of the backup engine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).HealthStatus = value ?? null; } + + /// To check if backup agent upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsAzureBackupAgentUpgradeAvailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).IsAzureBackupAgentUpgradeAvailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).IsAzureBackupAgentUpgradeAvailable = value ?? default(bool); } + + /// To check if backup engine upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDpmUpgradeAvailable { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).IsDpmUpgradeAvailable; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).IsDpmUpgradeAvailable = value ?? default(bool); } + + /// Registration status of the backup engine with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal)__backupEngineBase).RegistrationStatus = value ?? null; } + + /// Creates an new instance. + public DpmBackupEngine() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__backupEngineBase), __backupEngineBase); + await eventListener.AssertObjectIsValid(nameof(__backupEngineBase), __backupEngineBase); + } + } + /// Data Protection Manager (DPM) specific backup engine. + public partial interface IDpmBackupEngine : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBase + { + + } + /// Data Protection Manager (DPM) specific backup engine. + internal partial interface IDpmBackupEngineInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupEngineBaseInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmBackupEngine.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmBackupEngine.json.cs new file mode 100644 index 000000000000..f53e2df9f87d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmBackupEngine.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Data Protection Manager (DPM) specific backup engine. + public partial class DpmBackupEngine + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DpmBackupEngine(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __backupEngineBase = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBase(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmBackupEngine. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmBackupEngine. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmBackupEngine FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmBackupEngine(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __backupEngineBase?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainer.cs new file mode 100644 index 000000000000..ff4efdde15e0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainer.cs @@ -0,0 +1,227 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// DPM workload-specific protection container. + public partial class DpmContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private bool? _canReRegister; + + /// Specifies whether the container is re-registrable. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? CanReRegister { get => this._canReRegister; set => this._canReRegister = value; } + + /// Backing field for property. + private string _containerId; + + /// ID of container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerId { get => this._containerId; set => this._containerId = value; } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType = value ; } + + /// Backing field for property. + private string _dpmAgentVersion; + + /// Backup engine Agent version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DpmAgentVersion { get => this._dpmAgentVersion; set => this._dpmAgentVersion = value; } + + /// Backing field for property. + private string[] _dpmServer; + + /// List of BackupEngines protecting the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] DpmServer { get => this._dpmServer; set => this._dpmServer = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfo _extendedInfo; + + /// Extended Info of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmContainerExtendedInfo()); set => this._extendedInfo = value; } + + /// Last refresh time of the DPMContainer. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoLastRefreshedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfoInternal)ExtendedInfo).LastRefreshedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfoInternal)ExtendedInfo).LastRefreshedAt = value ?? default(global::System.DateTime); } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus = value ?? null; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmContainerExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType = value ?? null; } + + /// Backing field for property. + private long? _protectedItemCount; + + /// Number of protected items in the BackupEngine + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? ProtectedItemCount { get => this._protectedItemCount; set => this._protectedItemCount = value; } + + /// Backing field for property. + private string _protectionStatus; + + /// Protection status of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectionStatus { get => this._protectionStatus; set => this._protectionStatus = value; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus = value ?? null; } + + /// Backing field for property. + private bool? _upgradeAvailable; + + /// To check if upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? UpgradeAvailable { get => this._upgradeAvailable; set => this._upgradeAvailable = value; } + + /// Creates an new instance. + public DpmContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionContainer), __protectionContainer); + await eventListener.AssertObjectIsValid(nameof(__protectionContainer), __protectionContainer); + } + } + /// DPM workload-specific protection container. + public partial interface IDpmContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer + { + /// Specifies whether the container is re-registrable. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the container is re-registrable.", + SerializedName = @"canReRegister", + PossibleTypes = new [] { typeof(bool) })] + bool? CanReRegister { get; set; } + /// ID of container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of container.", + SerializedName = @"containerId", + PossibleTypes = new [] { typeof(string) })] + string ContainerId { get; set; } + /// Backup engine Agent version + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup engine Agent version", + SerializedName = @"dpmAgentVersion", + PossibleTypes = new [] { typeof(string) })] + string DpmAgentVersion { get; set; } + /// List of BackupEngines protecting the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of BackupEngines protecting the container", + SerializedName = @"dpmServers", + PossibleTypes = new [] { typeof(string) })] + string[] DpmServer { get; set; } + /// Last refresh time of the DPMContainer. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last refresh time of the DPMContainer.", + SerializedName = @"lastRefreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoLastRefreshedAt { get; set; } + /// Number of protected items in the BackupEngine + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of protected items in the BackupEngine", + SerializedName = @"protectedItemCount", + PossibleTypes = new [] { typeof(long) })] + long? ProtectedItemCount { get; set; } + /// Protection status of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection status of the container.", + SerializedName = @"protectionStatus", + PossibleTypes = new [] { typeof(string) })] + string ProtectionStatus { get; set; } + /// To check if upgrade available + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if upgrade available", + SerializedName = @"upgradeAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool? UpgradeAvailable { get; set; } + + } + /// DPM workload-specific protection container. + internal partial interface IDpmContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal + { + /// Specifies whether the container is re-registrable. + bool? CanReRegister { get; set; } + /// ID of container. + string ContainerId { get; set; } + /// Backup engine Agent version + string DpmAgentVersion { get; set; } + /// List of BackupEngines protecting the container + string[] DpmServer { get; set; } + /// Extended Info of the container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfo ExtendedInfo { get; set; } + /// Last refresh time of the DPMContainer. + global::System.DateTime? ExtendedInfoLastRefreshedAt { get; set; } + /// Number of protected items in the BackupEngine + long? ProtectedItemCount { get; set; } + /// Protection status of the container. + string ProtectionStatus { get; set; } + /// To check if upgrade available + bool? UpgradeAvailable { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainer.json.cs new file mode 100644 index 000000000000..d0a4b1f1c0ee --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainer.json.cs @@ -0,0 +1,147 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// DPM workload-specific protection container. + public partial class DpmContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DpmContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmContainerExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_canReRegister = If( json?.PropertyT("canReRegister"), out var __jsonCanReRegister) ? (bool?)__jsonCanReRegister : CanReRegister;} + {_containerId = If( json?.PropertyT("containerId"), out var __jsonContainerId) ? (string)__jsonContainerId : (string)ContainerId;} + {_protectedItemCount = If( json?.PropertyT("protectedItemCount"), out var __jsonProtectedItemCount) ? (long?)__jsonProtectedItemCount : ProtectedItemCount;} + {_dpmAgentVersion = If( json?.PropertyT("dpmAgentVersion"), out var __jsonDpmAgentVersion) ? (string)__jsonDpmAgentVersion : (string)DpmAgentVersion;} + {_dpmServer = If( json?.PropertyT("dpmServers"), out var __jsonDpmServers) ? If( __jsonDpmServers as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : DpmServer;} + {_upgradeAvailable = If( json?.PropertyT("upgradeAvailable"), out var __jsonUpgradeAvailable) ? (bool?)__jsonUpgradeAvailable : UpgradeAvailable;} + {_protectionStatus = If( json?.PropertyT("protectionStatus"), out var __jsonProtectionStatus) ? (string)__jsonProtectionStatus : (string)ProtectionStatus;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainer. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainer interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("containerType") ) + { + case "AzureBackupServerContainer": + { + return new AzureBackupServerContainer(json); + } + } + return new DpmContainer(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionContainer?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != this._canReRegister ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._canReRegister) : null, "canReRegister" ,container.Add ); + AddIf( null != (((object)this._containerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerId.ToString()) : null, "containerId" ,container.Add ); + AddIf( null != this._protectedItemCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._protectedItemCount) : null, "protectedItemCount" ,container.Add ); + AddIf( null != (((object)this._dpmAgentVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dpmAgentVersion.ToString()) : null, "dpmAgentVersion" ,container.Add ); + if (null != this._dpmServer) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._dpmServer ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("dpmServers",__w); + } + AddIf( null != this._upgradeAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._upgradeAvailable) : null, "upgradeAvailable" ,container.Add ); + AddIf( null != (((object)this._protectionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionStatus.ToString()) : null, "protectionStatus" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainerExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainerExtendedInfo.cs new file mode 100644 index 000000000000..29c3e0621daf --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainerExtendedInfo.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information of the DPMContainer. + public partial class DpmContainerExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfoInternal + { + + /// Backing field for property. + private global::System.DateTime? _lastRefreshedAt; + + /// Last refresh time of the DPMContainer. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastRefreshedAt { get => this._lastRefreshedAt; set => this._lastRefreshedAt = value; } + + /// Creates an new instance. + public DpmContainerExtendedInfo() + { + + } + } + /// Additional information of the DPMContainer. + public partial interface IDpmContainerExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Last refresh time of the DPMContainer. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last refresh time of the DPMContainer.", + SerializedName = @"lastRefreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastRefreshedAt { get; set; } + + } + /// Additional information of the DPMContainer. + internal partial interface IDpmContainerExtendedInfoInternal + + { + /// Last refresh time of the DPMContainer. + global::System.DateTime? LastRefreshedAt { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainerExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainerExtendedInfo.json.cs new file mode 100644 index 000000000000..9036632cf520 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmContainerExtendedInfo.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information of the DPMContainer. + public partial class DpmContainerExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DpmContainerExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_lastRefreshedAt = If( json?.PropertyT("lastRefreshedAt"), out var __jsonLastRefreshedAt) ? global::System.DateTime.TryParse((string)__jsonLastRefreshedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastRefreshedAtValue) ? __jsonLastRefreshedAtValue : LastRefreshedAt : LastRefreshedAt;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmContainerExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmContainerExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._lastRefreshedAt ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastRefreshedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastRefreshedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmErrorInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmErrorInfo.cs new file mode 100644 index 000000000000..41df37fad17a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmErrorInfo.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// DPM workload-specific error information. + public partial class DpmErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfoInternal + { + + /// Backing field for property. + private string _errorString; + + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorString { get => this._errorString; set => this._errorString = value; } + + /// Backing field for property. + private string[] _recommendation; + + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Recommendation { get => this._recommendation; set => this._recommendation = value; } + + /// Creates an new instance. + public DpmErrorInfo() + { + + } + } + /// DPM workload-specific error information. + public partial interface IDpmErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Localized error string.", + SerializedName = @"errorString", + PossibleTypes = new [] { typeof(string) })] + string ErrorString { get; set; } + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of localized recommendations for above error code.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] Recommendation { get; set; } + + } + /// DPM workload-specific error information. + internal partial interface IDpmErrorInfoInternal + + { + /// Localized error string. + string ErrorString { get; set; } + /// List of localized recommendations for above error code. + string[] Recommendation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmErrorInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmErrorInfo.json.cs new file mode 100644 index 000000000000..910670b2777d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmErrorInfo.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// DPM workload-specific error information. + public partial class DpmErrorInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DpmErrorInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorString = If( json?.PropertyT("errorString"), out var __jsonErrorString) ? (string)__jsonErrorString : (string)ErrorString;} + {_recommendation = If( json?.PropertyT("recommendations"), out var __jsonRecommendations) ? If( __jsonRecommendations as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Recommendation;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmErrorInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._errorString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorString.ToString()) : null, "errorString" ,container.Add ); + if (null != this._recommendation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recommendation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("recommendations",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJob.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJob.cs new file mode 100644 index 000000000000..808123917d3c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJob.cs @@ -0,0 +1,260 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// DPM workload-specific job object. + public partial class DpmJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJob, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] _actionsInfo; + + /// The state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get => this._actionsInfo; set => this._actionsInfo = value; } + + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ActivityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId = value ?? null; } + + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private string _containerName; + + /// Name of cluster/server protecting current backup item, if any. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// Backing field for property. + private string _containerType; + + /// Type of container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerType { get => this._containerType; set => this._containerType = value; } + + /// Backing field for property. + private string _dpmServerName; + + /// DPM server name managing the backup item or backup job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DpmServerName { get => this._dpmServerName; set => this._dpmServerName = value; } + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time elapsed for job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime = value ?? default(global::System.DateTime); } + + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EntityFriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo[] _errorDetail; + + /// The errors. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo[] ErrorDetail { get => this._errorDetail; set => this._errorDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfo _extendedInfo; + + /// Additional information for this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmJobExtendedInfo()); set => this._extendedInfo = value; } + + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoDynamicErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage = value ?? null; } + + /// The job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoInternal)ExtendedInfo).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoInternal)ExtendedInfo).PropertyBag = value ?? null /* model class */; } + + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails[] ExtendedInfoTasksList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoInternal)ExtendedInfo).TasksList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoInternal)ExtendedInfo).TasksList = value ?? null /* arrayOf */; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmJobExtendedInfo()); set { {_extendedInfo = value;} } } + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation = value ?? null; } + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime = value ?? default(global::System.DateTime); } + + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status = value ?? null; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type = value ; } + + /// Backing field for property. + private string _workloadType; + + /// Type of backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public DpmJob() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__job), __job); + await eventListener.AssertObjectIsValid(nameof(__job), __job); + } + } + /// DPM workload-specific job object. + public partial interface IDpmJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob + { + /// The state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The state/actions applicable on this job like cancel/retry.", + SerializedName = @"actionsInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Name of cluster/server protecting current backup item, if any. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of cluster/server protecting current backup item, if any.", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// Type of container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of container.", + SerializedName = @"containerType", + PossibleTypes = new [] { typeof(string) })] + string ContainerType { get; set; } + /// DPM server name managing the backup item or backup job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"DPM server name managing the backup item or backup job.", + SerializedName = @"dpmServerName", + PossibleTypes = new [] { typeof(string) })] + string DpmServerName { get; set; } + /// Time elapsed for job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time elapsed for job.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// The errors. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The errors.", + SerializedName = @"errorDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo[] ErrorDetail { get; set; } + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message on job execution.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoDynamicErrorMessage { get; set; } + /// The job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks associated with this job.", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Type of backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup item.", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(string) })] + string WorkloadType { get; set; } + + } + /// DPM workload-specific job object. + internal partial interface IDpmJobInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal + { + /// The state/actions applicable on this job like cancel/retry. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Name of cluster/server protecting current backup item, if any. + string ContainerName { get; set; } + /// Type of container. + string ContainerType { get; set; } + /// DPM server name managing the backup item or backup job. + string DpmServerName { get; set; } + /// Time elapsed for job. + global::System.TimeSpan? Duration { get; set; } + /// The errors. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo[] ErrorDetail { get; set; } + /// Additional information for this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfo ExtendedInfo { get; set; } + /// Non localized error message on job execution. + string ExtendedInfoDynamicErrorMessage { get; set; } + /// The job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks associated with this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Type of backup item. + string WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJob.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJob.json.cs new file mode 100644 index 000000000000..c3ef6f31ee8a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJob.json.cs @@ -0,0 +1,140 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// DPM workload-specific job object. + public partial class DpmJob + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DpmJob(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmJobExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_dpmServerName = If( json?.PropertyT("dpmServerName"), out var __jsonDpmServerName) ? (string)__jsonDpmServerName : (string)DpmServerName;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_containerType = If( json?.PropertyT("containerType"), out var __jsonContainerType) ? (string)__jsonContainerType : (string)ContainerType;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + {_actionsInfo = If( json?.PropertyT("actionsInfo"), out var __jsonActionsInfo) ? If( __jsonActionsInfo as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)""))) ))() : null : ActionsInfo;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? If( __jsonErrorDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmErrorInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmErrorInfo.FromJson(__p) )) ))() : null : ErrorDetail;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJob. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJob. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmJob(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __job?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + AddIf( null != (((object)this._dpmServerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dpmServerName.ToString()) : null, "dpmServerName" ,container.Add ); + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != (((object)this._containerType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerType.ToString()) : null, "containerType" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + if (null != this._actionsInfo) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._actionsInfo ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("actionsInfo",__w); + } + if (null != this._errorDetail) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._errorDetail ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("errorDetails",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfo.cs new file mode 100644 index 000000000000..0e713ae5c2b6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfo.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on the DPM workload-specific job. + public partial class DpmJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoInternal + { + + /// Backing field for property. + private string _dynamicErrorMessage; + + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DynamicErrorMessage { get => this._dynamicErrorMessage; set => this._dynamicErrorMessage = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag _propertyBag; + + /// The job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag PropertyBag { get => (this._propertyBag = this._propertyBag ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmJobExtendedInfoPropertyBag()); set => this._propertyBag = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails[] _tasksList; + + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails[] TasksList { get => this._tasksList; set => this._tasksList = value; } + + /// Creates an new instance. + public DpmJobExtendedInfo() + { + + } + } + /// Additional information on the DPM workload-specific job. + public partial interface IDpmJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Non localized error message on job execution. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message on job execution.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string DynamicErrorMessage { get; set; } + /// The job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks associated with this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks associated with this job.", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails[] TasksList { get; set; } + + } + /// Additional information on the DPM workload-specific job. + internal partial interface IDpmJobExtendedInfoInternal + + { + /// Non localized error message on job execution. + string DynamicErrorMessage { get; set; } + /// The job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks associated with this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails[] TasksList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfo.json.cs new file mode 100644 index 000000000000..8c39b47f1260 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfo.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on the DPM workload-specific job. + public partial class DpmJobExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DpmJobExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_tasksList = If( json?.PropertyT("tasksList"), out var __jsonTasksList) ? If( __jsonTasksList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmJobTaskDetails.FromJson(__u) )) ))() : null : TasksList;} + {_propertyBag = If( json?.PropertyT("propertyBag"), out var __jsonPropertyBag) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmJobExtendedInfoPropertyBag.FromJson(__jsonPropertyBag) : PropertyBag;} + {_dynamicErrorMessage = If( json?.PropertyT("dynamicErrorMessage"), out var __jsonDynamicErrorMessage) ? (string)__jsonDynamicErrorMessage : (string)DynamicErrorMessage;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmJobExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._tasksList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._tasksList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tasksList",__w); + } + AddIf( null != this._propertyBag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._propertyBag.ToJson(null,serializationMode) : null, "propertyBag" ,container.Add ); + AddIf( null != (((object)this._dynamicErrorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dynamicErrorMessage.ToString()) : null, "dynamicErrorMessage" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfoPropertyBag.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfoPropertyBag.cs new file mode 100644 index 000000000000..05316c3fec78 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfoPropertyBag.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The job properties. + public partial class DpmJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBagInternal + { + + /// Creates an new instance. + public DpmJobExtendedInfoPropertyBag() + { + + } + } + /// The job properties. + public partial interface IDpmJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// The job properties. + internal partial interface IDpmJobExtendedInfoPropertyBagInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfoPropertyBag.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfoPropertyBag.dictionary.cs new file mode 100644 index 000000000000..8719ed06312d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfoPropertyBag.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class DpmJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmJobExtendedInfoPropertyBag source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfoPropertyBag.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfoPropertyBag.json.cs new file mode 100644 index 000000000000..c0f70e679788 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobExtendedInfoPropertyBag.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The job properties. + public partial class DpmJobExtendedInfoPropertyBag + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal DpmJobExtendedInfoPropertyBag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobExtendedInfoPropertyBag FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmJobExtendedInfoPropertyBag(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobTaskDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobTaskDetails.cs new file mode 100644 index 000000000000..d0e60b857767 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobTaskDetails.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// DPM workload-specific job task details. + public partial class DpmJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetailsInternal + { + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time elapsed for task. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private string _status; + + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private string _taskId; + + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TaskId { get => this._taskId; set => this._taskId = value; } + + /// Creates an new instance. + public DpmJobTaskDetails() + { + + } + } + /// DPM workload-specific job task details. + public partial interface IDpmJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Time elapsed for task. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time elapsed for task.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The task display name.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; set; } + + } + /// DPM workload-specific job task details. + internal partial interface IDpmJobTaskDetailsInternal + + { + /// Time elapsed for task. + global::System.TimeSpan? Duration { get; set; } + /// The end time. + global::System.DateTime? EndTime { get; set; } + /// The start time. + global::System.DateTime? StartTime { get; set; } + /// The status. + string Status { get; set; } + /// The task display name. + string TaskId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobTaskDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobTaskDetails.json.cs new file mode 100644 index 000000000000..4c503bdc34d9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmJobTaskDetails.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// DPM workload-specific job task details. + public partial class DpmJobTaskDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DpmJobTaskDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_taskId = If( json?.PropertyT("taskId"), out var __jsonTaskId) ? (string)__jsonTaskId : (string)TaskId;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmJobTaskDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmJobTaskDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._taskId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._taskId.ToString()) : null, "taskId" ,container.Add ); + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItem.cs new file mode 100644 index 000000000000..a3f138945453 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItem.cs @@ -0,0 +1,399 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on Backup engine specific backup item. + public partial class DpmProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(); + + /// Backing field for property. + private string _backupEngineName; + + /// Backup Management server protecting this backup item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupEngineName { get => this._backupEngineName; set => this._backupEngineName = value; } + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfo _extendedInfo; + + /// Extended info of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmProtectedItemExtendedInfo()); set => this._extendedInfo = value; } + + /// Used Disk storage in bytes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoDiskStorageUsedInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).DiskStorageUsedInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).DiskStorageUsedInByte = value ?? null; } + + /// To check if backup item is collocated. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? ExtendedInfoIsCollocated { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).IsCollocated; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).IsCollocated = value ?? default(bool); } + + /// To check if backup item is cloud protected. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? ExtendedInfoIsPresentOnCloud { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).IsPresentOnCloud; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).IsPresentOnCloud = value ?? default(bool); } + + /// Last backup status information on backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoLastBackupStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).LastBackupStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).LastBackupStatus = value ?? null; } + + /// Last refresh time on backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoLastRefreshedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).LastRefreshedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).LastRefreshedAt = value ?? default(global::System.DateTime); } + + /// Oldest cloud recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// latest disk recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOnPremiseLatestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).OnPremiseLatestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).OnPremiseLatestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Oldest disk recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOnPremiseOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).OnPremiseOldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).OnPremiseOldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// disk recovery point count. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoOnPremiseRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).OnPremiseRecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).OnPremiseRecoveryPointCount = value ?? default(int); } + + /// Attribute to provide information on various DBs. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath ExtendedInfoProtectableObjectLoadPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).ProtectableObjectLoadPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).ProtectableObjectLoadPath = value ?? null /* model class */; } + + /// To check if backup item is disk protected. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? ExtendedInfoProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).Protected; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).Protected = value ?? default(bool); } + + /// Protection group name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoProtectionGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).ProtectionGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).ProtectionGroupName = value ?? null; } + + /// cloud recovery point count. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount = value ?? default(int); } + + /// total Disk storage in bytes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoTotalDiskStorageSizeInByte { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).TotalDiskStorageSizeInByte; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal)ExtendedInfo).TotalDiskStorageSizeInByte = value ?? null; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the managed item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmProtectedItemExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType = value; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState? _protectionState; + + /// Protection state of the backup engine + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState? ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; } + + /// Creates an new instance. + public DpmProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectedItem), __protectedItem); + await eventListener.AssertObjectIsValid(nameof(__protectedItem), __protectedItem); + } + } + /// Additional information on Backup engine specific backup item. + public partial interface IDpmProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem + { + /// Backup Management server protecting this backup item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup Management server protecting this backup item", + SerializedName = @"backupEngineName", + PossibleTypes = new [] { typeof(string) })] + string BackupEngineName { get; set; } + /// Used Disk storage in bytes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Used Disk storage in bytes.", + SerializedName = @"diskStorageUsedInBytes", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoDiskStorageUsedInByte { get; set; } + /// To check if backup item is collocated. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup item is collocated.", + SerializedName = @"isCollocated", + PossibleTypes = new [] { typeof(bool) })] + bool? ExtendedInfoIsCollocated { get; set; } + /// To check if backup item is cloud protected. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup item is cloud protected.", + SerializedName = @"isPresentOnCloud", + PossibleTypes = new [] { typeof(bool) })] + bool? ExtendedInfoIsPresentOnCloud { get; set; } + /// Last backup status information on backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last backup status information on backup item.", + SerializedName = @"lastBackupStatus", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoLastBackupStatus { get; set; } + /// Last refresh time on backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last refresh time on backup item.", + SerializedName = @"lastRefreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoLastRefreshedAt { get; set; } + /// Oldest cloud recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oldest cloud recovery point time.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// latest disk recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"latest disk recovery point time.", + SerializedName = @"onPremiseLatestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOnPremiseLatestRecoveryPoint { get; set; } + /// Oldest disk recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oldest disk recovery point time.", + SerializedName = @"onPremiseOldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOnPremiseOldestRecoveryPoint { get; set; } + /// disk recovery point count. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"disk recovery point count.", + SerializedName = @"onPremiseRecoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoOnPremiseRecoveryPointCount { get; set; } + /// Attribute to provide information on various DBs. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Attribute to provide information on various DBs.", + SerializedName = @"protectableObjectLoadPath", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath ExtendedInfoProtectableObjectLoadPath { get; set; } + /// To check if backup item is disk protected. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup item is disk protected.", + SerializedName = @"protected", + PossibleTypes = new [] { typeof(bool) })] + bool? ExtendedInfoProtected { get; set; } + /// Protection group name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection group name of the backup item.", + SerializedName = @"protectionGroupName", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoProtectionGroupName { get; set; } + /// cloud recovery point count. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"cloud recovery point count.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoRecoveryPointCount { get; set; } + /// total Disk storage in bytes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"total Disk storage in bytes.", + SerializedName = @"totalDiskStorageSizeInBytes", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoTotalDiskStorageSizeInByte { get; set; } + /// Friendly name of the managed item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the managed item", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Protection state of the backup engine + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection state of the backup engine", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState? ProtectionState { get; set; } + + } + /// Additional information on Backup engine specific backup item. + internal partial interface IDpmProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal + { + /// Backup Management server protecting this backup item + string BackupEngineName { get; set; } + /// Extended info of the backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfo ExtendedInfo { get; set; } + /// Used Disk storage in bytes. + string ExtendedInfoDiskStorageUsedInByte { get; set; } + /// To check if backup item is collocated. + bool? ExtendedInfoIsCollocated { get; set; } + /// To check if backup item is cloud protected. + bool? ExtendedInfoIsPresentOnCloud { get; set; } + /// Last backup status information on backup item. + string ExtendedInfoLastBackupStatus { get; set; } + /// Last refresh time on backup item. + global::System.DateTime? ExtendedInfoLastRefreshedAt { get; set; } + /// Oldest cloud recovery point time. + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// latest disk recovery point time. + global::System.DateTime? ExtendedInfoOnPremiseLatestRecoveryPoint { get; set; } + /// Oldest disk recovery point time. + global::System.DateTime? ExtendedInfoOnPremiseOldestRecoveryPoint { get; set; } + /// disk recovery point count. + int? ExtendedInfoOnPremiseRecoveryPointCount { get; set; } + /// Attribute to provide information on various DBs. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath ExtendedInfoProtectableObjectLoadPath { get; set; } + /// To check if backup item is disk protected. + bool? ExtendedInfoProtected { get; set; } + /// Protection group name of the backup item. + string ExtendedInfoProtectionGroupName { get; set; } + /// cloud recovery point count. + int? ExtendedInfoRecoveryPointCount { get; set; } + /// total Disk storage in bytes. + string ExtendedInfoTotalDiskStorageSizeInByte { get; set; } + /// Friendly name of the managed item + string FriendlyName { get; set; } + /// Protection state of the backup engine + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState? ProtectionState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItem.json.cs new file mode 100644 index 000000000000..561281205898 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItem.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on Backup engine specific backup item. + public partial class DpmProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DpmProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmProtectedItemExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_backupEngineName = If( json?.PropertyT("backupEngineName"), out var __jsonBackupEngineName) ? (string)__jsonBackupEngineName : (string)BackupEngineName;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmProtectedItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectedItem?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._backupEngineName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupEngineName.ToString()) : null, "backupEngineName" ,container.Add ); + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfo.cs new file mode 100644 index 000000000000..774be9fda7ec --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfo.cs @@ -0,0 +1,272 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information of DPM Protected item. + public partial class DpmProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoInternal + { + + /// Backing field for property. + private string _diskStorageUsedInByte; + + /// Used Disk storage in bytes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DiskStorageUsedInByte { get => this._diskStorageUsedInByte; set => this._diskStorageUsedInByte = value; } + + /// Backing field for property. + private bool? _isCollocated; + + /// To check if backup item is collocated. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsCollocated { get => this._isCollocated; set => this._isCollocated = value; } + + /// Backing field for property. + private bool? _isPresentOnCloud; + + /// To check if backup item is cloud protected. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsPresentOnCloud { get => this._isPresentOnCloud; set => this._isPresentOnCloud = value; } + + /// Backing field for property. + private string _lastBackupStatus; + + /// Last backup status information on backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LastBackupStatus { get => this._lastBackupStatus; set => this._lastBackupStatus = value; } + + /// Backing field for property. + private global::System.DateTime? _lastRefreshedAt; + + /// Last refresh time on backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastRefreshedAt { get => this._lastRefreshedAt; set => this._lastRefreshedAt = value; } + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPoint; + + /// Oldest cloud recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPoint { get => this._oldestRecoveryPoint; set => this._oldestRecoveryPoint = value; } + + /// Backing field for property. + private global::System.DateTime? _onPremiseLatestRecoveryPoint; + + /// latest disk recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OnPremiseLatestRecoveryPoint { get => this._onPremiseLatestRecoveryPoint; set => this._onPremiseLatestRecoveryPoint = value; } + + /// Backing field for property. + private global::System.DateTime? _onPremiseOldestRecoveryPoint; + + /// Oldest disk recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OnPremiseOldestRecoveryPoint { get => this._onPremiseOldestRecoveryPoint; set => this._onPremiseOldestRecoveryPoint = value; } + + /// Backing field for property. + private int? _onPremiseRecoveryPointCount; + + /// disk recovery point count. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? OnPremiseRecoveryPointCount { get => this._onPremiseRecoveryPointCount; set => this._onPremiseRecoveryPointCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath _protectableObjectLoadPath; + + /// Attribute to provide information on various DBs. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath ProtectableObjectLoadPath { get => (this._protectableObjectLoadPath = this._protectableObjectLoadPath ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmProtectedItemExtendedInfoProtectableObjectLoadPath()); set => this._protectableObjectLoadPath = value; } + + /// Backing field for property. + private bool? _protected; + + /// To check if backup item is disk protected. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? Protected { get => this._protected; set => this._protected = value; } + + /// Backing field for property. + private string _protectionGroupName; + + /// Protection group name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectionGroupName { get => this._protectionGroupName; set => this._protectionGroupName = value; } + + /// Backing field for property. + private int? _recoveryPointCount; + + /// cloud recovery point count. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? RecoveryPointCount { get => this._recoveryPointCount; set => this._recoveryPointCount = value; } + + /// Backing field for property. + private string _totalDiskStorageSizeInByte; + + /// total Disk storage in bytes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TotalDiskStorageSizeInByte { get => this._totalDiskStorageSizeInByte; set => this._totalDiskStorageSizeInByte = value; } + + /// Creates an new instance. + public DpmProtectedItemExtendedInfo() + { + + } + } + /// Additional information of DPM Protected item. + public partial interface IDpmProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Used Disk storage in bytes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Used Disk storage in bytes.", + SerializedName = @"diskStorageUsedInBytes", + PossibleTypes = new [] { typeof(string) })] + string DiskStorageUsedInByte { get; set; } + /// To check if backup item is collocated. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup item is collocated.", + SerializedName = @"isCollocated", + PossibleTypes = new [] { typeof(bool) })] + bool? IsCollocated { get; set; } + /// To check if backup item is cloud protected. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup item is cloud protected.", + SerializedName = @"isPresentOnCloud", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPresentOnCloud { get; set; } + /// Last backup status information on backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last backup status information on backup item.", + SerializedName = @"lastBackupStatus", + PossibleTypes = new [] { typeof(string) })] + string LastBackupStatus { get; set; } + /// Last refresh time on backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last refresh time on backup item.", + SerializedName = @"lastRefreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastRefreshedAt { get; set; } + /// Oldest cloud recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oldest cloud recovery point time.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// latest disk recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"latest disk recovery point time.", + SerializedName = @"onPremiseLatestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OnPremiseLatestRecoveryPoint { get; set; } + /// Oldest disk recovery point time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oldest disk recovery point time.", + SerializedName = @"onPremiseOldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OnPremiseOldestRecoveryPoint { get; set; } + /// disk recovery point count. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"disk recovery point count.", + SerializedName = @"onPremiseRecoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? OnPremiseRecoveryPointCount { get; set; } + /// Attribute to provide information on various DBs. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Attribute to provide information on various DBs.", + SerializedName = @"protectableObjectLoadPath", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath ProtectableObjectLoadPath { get; set; } + /// To check if backup item is disk protected. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To check if backup item is disk protected.", + SerializedName = @"protected", + PossibleTypes = new [] { typeof(bool) })] + bool? Protected { get; set; } + /// Protection group name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection group name of the backup item.", + SerializedName = @"protectionGroupName", + PossibleTypes = new [] { typeof(string) })] + string ProtectionGroupName { get; set; } + /// cloud recovery point count. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"cloud recovery point count.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? RecoveryPointCount { get; set; } + /// total Disk storage in bytes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"total Disk storage in bytes.", + SerializedName = @"totalDiskStorageSizeInBytes", + PossibleTypes = new [] { typeof(string) })] + string TotalDiskStorageSizeInByte { get; set; } + + } + /// Additional information of DPM Protected item. + internal partial interface IDpmProtectedItemExtendedInfoInternal + + { + /// Used Disk storage in bytes. + string DiskStorageUsedInByte { get; set; } + /// To check if backup item is collocated. + bool? IsCollocated { get; set; } + /// To check if backup item is cloud protected. + bool? IsPresentOnCloud { get; set; } + /// Last backup status information on backup item. + string LastBackupStatus { get; set; } + /// Last refresh time on backup item. + global::System.DateTime? LastRefreshedAt { get; set; } + /// Oldest cloud recovery point time. + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// latest disk recovery point time. + global::System.DateTime? OnPremiseLatestRecoveryPoint { get; set; } + /// Oldest disk recovery point time. + global::System.DateTime? OnPremiseOldestRecoveryPoint { get; set; } + /// disk recovery point count. + int? OnPremiseRecoveryPointCount { get; set; } + /// Attribute to provide information on various DBs. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath ProtectableObjectLoadPath { get; set; } + /// To check if backup item is disk protected. + bool? Protected { get; set; } + /// Protection group name of the backup item. + string ProtectionGroupName { get; set; } + /// cloud recovery point count. + int? RecoveryPointCount { get; set; } + /// total Disk storage in bytes. + string TotalDiskStorageSizeInByte { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfo.json.cs new file mode 100644 index 000000000000..cae1c8b2cf8a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfo.json.cs @@ -0,0 +1,134 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information of DPM Protected item. + public partial class DpmProtectedItemExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal DpmProtectedItemExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_protectableObjectLoadPath = If( json?.PropertyT("protectableObjectLoadPath"), out var __jsonProtectableObjectLoadPath) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmProtectedItemExtendedInfoProtectableObjectLoadPath.FromJson(__jsonProtectableObjectLoadPath) : ProtectableObjectLoadPath;} + {_protected = If( json?.PropertyT("protected"), out var __jsonProtected) ? (bool?)__jsonProtected : Protected;} + {_isPresentOnCloud = If( json?.PropertyT("isPresentOnCloud"), out var __jsonIsPresentOnCloud) ? (bool?)__jsonIsPresentOnCloud : IsPresentOnCloud;} + {_lastBackupStatus = If( json?.PropertyT("lastBackupStatus"), out var __jsonLastBackupStatus) ? (string)__jsonLastBackupStatus : (string)LastBackupStatus;} + {_lastRefreshedAt = If( json?.PropertyT("lastRefreshedAt"), out var __jsonLastRefreshedAt) ? global::System.DateTime.TryParse((string)__jsonLastRefreshedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastRefreshedAtValue) ? __jsonLastRefreshedAtValue : LastRefreshedAt : LastRefreshedAt;} + {_oldestRecoveryPoint = If( json?.PropertyT("oldestRecoveryPoint"), out var __jsonOldestRecoveryPoint) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPoint, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointValue) ? __jsonOldestRecoveryPointValue : OldestRecoveryPoint : OldestRecoveryPoint;} + {_recoveryPointCount = If( json?.PropertyT("recoveryPointCount"), out var __jsonRecoveryPointCount) ? (int?)__jsonRecoveryPointCount : RecoveryPointCount;} + {_onPremiseOldestRecoveryPoint = If( json?.PropertyT("onPremiseOldestRecoveryPoint"), out var __jsonOnPremiseOldestRecoveryPoint) ? global::System.DateTime.TryParse((string)__jsonOnPremiseOldestRecoveryPoint, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOnPremiseOldestRecoveryPointValue) ? __jsonOnPremiseOldestRecoveryPointValue : OnPremiseOldestRecoveryPoint : OnPremiseOldestRecoveryPoint;} + {_onPremiseLatestRecoveryPoint = If( json?.PropertyT("onPremiseLatestRecoveryPoint"), out var __jsonOnPremiseLatestRecoveryPoint) ? global::System.DateTime.TryParse((string)__jsonOnPremiseLatestRecoveryPoint, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOnPremiseLatestRecoveryPointValue) ? __jsonOnPremiseLatestRecoveryPointValue : OnPremiseLatestRecoveryPoint : OnPremiseLatestRecoveryPoint;} + {_onPremiseRecoveryPointCount = If( json?.PropertyT("onPremiseRecoveryPointCount"), out var __jsonOnPremiseRecoveryPointCount) ? (int?)__jsonOnPremiseRecoveryPointCount : OnPremiseRecoveryPointCount;} + {_isCollocated = If( json?.PropertyT("isCollocated"), out var __jsonIsCollocated) ? (bool?)__jsonIsCollocated : IsCollocated;} + {_protectionGroupName = If( json?.PropertyT("protectionGroupName"), out var __jsonProtectionGroupName) ? (string)__jsonProtectionGroupName : (string)ProtectionGroupName;} + {_diskStorageUsedInByte = If( json?.PropertyT("diskStorageUsedInBytes"), out var __jsonDiskStorageUsedInBytes) ? (string)__jsonDiskStorageUsedInBytes : (string)DiskStorageUsedInByte;} + {_totalDiskStorageSizeInByte = If( json?.PropertyT("totalDiskStorageSizeInBytes"), out var __jsonTotalDiskStorageSizeInBytes) ? (string)__jsonTotalDiskStorageSizeInBytes : (string)TotalDiskStorageSizeInByte;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmProtectedItemExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._protectableObjectLoadPath ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._protectableObjectLoadPath.ToJson(null,serializationMode) : null, "protectableObjectLoadPath" ,container.Add ); + AddIf( null != this._protected ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._protected) : null, "protected" ,container.Add ); + AddIf( null != this._isPresentOnCloud ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isPresentOnCloud) : null, "isPresentOnCloud" ,container.Add ); + AddIf( null != (((object)this._lastBackupStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupStatus.ToString()) : null, "lastBackupStatus" ,container.Add ); + AddIf( null != this._lastRefreshedAt ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastRefreshedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastRefreshedAt" ,container.Add ); + AddIf( null != this._oldestRecoveryPoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPoint?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPoint" ,container.Add ); + AddIf( null != this._recoveryPointCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._recoveryPointCount) : null, "recoveryPointCount" ,container.Add ); + AddIf( null != this._onPremiseOldestRecoveryPoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._onPremiseOldestRecoveryPoint?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "onPremiseOldestRecoveryPoint" ,container.Add ); + AddIf( null != this._onPremiseLatestRecoveryPoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._onPremiseLatestRecoveryPoint?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "onPremiseLatestRecoveryPoint" ,container.Add ); + AddIf( null != this._onPremiseRecoveryPointCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._onPremiseRecoveryPointCount) : null, "onPremiseRecoveryPointCount" ,container.Add ); + AddIf( null != this._isCollocated ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isCollocated) : null, "isCollocated" ,container.Add ); + AddIf( null != (((object)this._protectionGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionGroupName.ToString()) : null, "protectionGroupName" ,container.Add ); + AddIf( null != (((object)this._diskStorageUsedInByte)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._diskStorageUsedInByte.ToString()) : null, "diskStorageUsedInBytes" ,container.Add ); + AddIf( null != (((object)this._totalDiskStorageSizeInByte)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._totalDiskStorageSizeInByte.ToString()) : null, "totalDiskStorageSizeInBytes" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfoProtectableObjectLoadPath.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfoProtectableObjectLoadPath.cs new file mode 100644 index 000000000000..899f8698d18f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfoProtectableObjectLoadPath.cs @@ -0,0 +1,37 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Attribute to provide information on various DBs. + public partial class DpmProtectedItemExtendedInfoProtectableObjectLoadPath : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPathInternal + { + + /// + /// Creates an new instance. + /// + public DpmProtectedItemExtendedInfoProtectableObjectLoadPath() + { + + } + } + /// Attribute to provide information on various DBs. + public partial interface IDpmProtectedItemExtendedInfoProtectableObjectLoadPath : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Attribute to provide information on various DBs. + internal partial interface IDpmProtectedItemExtendedInfoProtectableObjectLoadPathInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfoProtectableObjectLoadPath.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfoProtectableObjectLoadPath.dictionary.cs new file mode 100644 index 000000000000..59f1f52eed39 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfoProtectableObjectLoadPath.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class DpmProtectedItemExtendedInfoProtectableObjectLoadPath : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DpmProtectedItemExtendedInfoProtectableObjectLoadPath source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfoProtectableObjectLoadPath.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfoProtectableObjectLoadPath.json.cs new file mode 100644 index 000000000000..8a5ea7d5c4d7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/DpmProtectedItemExtendedInfoProtectableObjectLoadPath.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Attribute to provide information on various DBs. + public partial class DpmProtectedItemExtendedInfoProtectableObjectLoadPath + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal DpmProtectedItemExtendedInfoProtectableObjectLoadPath(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDpmProtectedItemExtendedInfoProtectableObjectLoadPath FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new DpmProtectedItemExtendedInfoProtectableObjectLoadPath(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/EncryptionDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/EncryptionDetails.cs new file mode 100644 index 000000000000..fe4f2bf1d898 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/EncryptionDetails.cs @@ -0,0 +1,125 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Details needed if the VM was encrypted at the time of backup. + public partial class EncryptionDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal + { + + /// Backing field for property. + private bool? _encryptionEnabled; + + /// + /// Identifies whether this backup copy represents an encrypted VM at the time of backup. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? EncryptionEnabled { get => this._encryptionEnabled; set => this._encryptionEnabled = value; } + + /// Backing field for property. + private string _kekUrl; + + /// Key Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string KekUrl { get => this._kekUrl; set => this._kekUrl = value; } + + /// Backing field for property. + private string _kekVaultId; + + /// ID of Key Vault where KEK is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string KekVaultId { get => this._kekVaultId; set => this._kekVaultId = value; } + + /// Backing field for property. + private string _secretKeyUrl; + + /// Secret Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SecretKeyUrl { get => this._secretKeyUrl; set => this._secretKeyUrl = value; } + + /// Backing field for property. + private string _secretKeyVaultId; + + /// ID of Key Vault where Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SecretKeyVaultId { get => this._secretKeyVaultId; set => this._secretKeyVaultId = value; } + + /// Creates an new instance. + public EncryptionDetails() + { + + } + } + /// Details needed if the VM was encrypted at the time of backup. + public partial interface IEncryptionDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// Identifies whether this backup copy represents an encrypted VM at the time of backup. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifies whether this backup copy represents an encrypted VM at the time of backup.", + SerializedName = @"encryptionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? EncryptionEnabled { get; set; } + /// Key Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Url.", + SerializedName = @"kekUrl", + PossibleTypes = new [] { typeof(string) })] + string KekUrl { get; set; } + /// ID of Key Vault where KEK is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of Key Vault where KEK is stored.", + SerializedName = @"kekVaultId", + PossibleTypes = new [] { typeof(string) })] + string KekVaultId { get; set; } + /// Secret Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Secret Url.", + SerializedName = @"secretKeyUrl", + PossibleTypes = new [] { typeof(string) })] + string SecretKeyUrl { get; set; } + /// ID of Key Vault where Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of Key Vault where Secret is stored.", + SerializedName = @"secretKeyVaultId", + PossibleTypes = new [] { typeof(string) })] + string SecretKeyVaultId { get; set; } + + } + /// Details needed if the VM was encrypted at the time of backup. + internal partial interface IEncryptionDetailsInternal + + { + /// + /// Identifies whether this backup copy represents an encrypted VM at the time of backup. + /// + bool? EncryptionEnabled { get; set; } + /// Key Url. + string KekUrl { get; set; } + /// ID of Key Vault where KEK is stored. + string KekVaultId { get; set; } + /// Secret Url. + string SecretKeyUrl { get; set; } + /// ID of Key Vault where Secret is stored. + string SecretKeyVaultId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/EncryptionDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/EncryptionDetails.json.cs new file mode 100644 index 000000000000..43118ebf623a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/EncryptionDetails.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Details needed if the VM was encrypted at the time of backup. + public partial class EncryptionDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal EncryptionDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_encryptionEnabled = If( json?.PropertyT("encryptionEnabled"), out var __jsonEncryptionEnabled) ? (bool?)__jsonEncryptionEnabled : EncryptionEnabled;} + {_kekUrl = If( json?.PropertyT("kekUrl"), out var __jsonKekUrl) ? (string)__jsonKekUrl : (string)KekUrl;} + {_secretKeyUrl = If( json?.PropertyT("secretKeyUrl"), out var __jsonSecretKeyUrl) ? (string)__jsonSecretKeyUrl : (string)SecretKeyUrl;} + {_kekVaultId = If( json?.PropertyT("kekVaultId"), out var __jsonKekVaultId) ? (string)__jsonKekVaultId : (string)KekVaultId;} + {_secretKeyVaultId = If( json?.PropertyT("secretKeyVaultId"), out var __jsonSecretKeyVaultId) ? (string)__jsonSecretKeyVaultId : (string)SecretKeyVaultId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new EncryptionDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._encryptionEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._encryptionEnabled) : null, "encryptionEnabled" ,container.Add ); + AddIf( null != (((object)this._kekUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._kekUrl.ToString()) : null, "kekUrl" ,container.Add ); + AddIf( null != (((object)this._secretKeyUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._secretKeyUrl.ToString()) : null, "secretKeyUrl" ,container.Add ); + AddIf( null != (((object)this._kekVaultId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._kekVaultId.ToString()) : null, "kekVaultId" ,container.Add ); + AddIf( null != (((object)this._secretKeyVaultId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._secretKeyVaultId.ToString()) : null, "secretKeyVaultId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ErrorDetail.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ErrorDetail.cs new file mode 100644 index 000000000000..2f28cb5b0213 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ErrorDetail.cs @@ -0,0 +1,94 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Error Detail class which encapsulates Code, Message and Recommendations. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal + { + + /// Backing field for property. + private string _code; + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private string _message; + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Recommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal.Recommendation { get => this._recommendation; set { {_recommendation = value;} } } + + /// Backing field for property. + private string[] _recommendation; + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Recommendation { get => this._recommendation; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// Error Detail class which encapsulates Code, Message and Recommendations. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Message related to the Code.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of recommendation strings.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] Recommendation { get; } + + } + /// Error Detail class which encapsulates Code, Message and Recommendations. + internal partial interface IErrorDetailInternal + + { + /// Error code. + string Code { get; set; } + /// Error Message related to the Code. + string Message { get; set; } + /// List of recommendation strings. + string[] Recommendation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ErrorDetail.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ErrorDetail.json.cs new file mode 100644 index 000000000000..2d0eb546ee76 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ErrorDetail.json.cs @@ -0,0 +1,129 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Error Detail class which encapsulates Code, Message and Recommendations. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_recommendation = If( json?.PropertyT("recommendations"), out var __jsonRecommendations) ? If( __jsonRecommendations as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Recommendation;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._recommendation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recommendation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("recommendations",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExportJobsOperationResultInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExportJobsOperationResultInfo.cs new file mode 100644 index 000000000000..b7c303bd07a4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExportJobsOperationResultInfo.cs @@ -0,0 +1,127 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// This class is used to send blob details after exporting jobs. + public partial class ExportJobsOperationResultInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExportJobsOperationResultInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExportJobsOperationResultInfoInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase __operationResultInfoBase = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationResultInfoBase(); + + /// Backing field for property. + private string _blobSasKey; + + /// SAS key to access the blob. It expires in 15 mins. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BlobSasKey { get => this._blobSasKey; set => this._blobSasKey = value; } + + /// Backing field for property. + private string _blobUrl; + + /// URL of the blob into which the serialized string of list of jobs is exported. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BlobUrl { get => this._blobUrl; set => this._blobUrl = value; } + + /// Backing field for property. + private string _excelFileBlobSasKey; + + /// SAS key to access the blob. It expires in 15 mins. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ExcelFileBlobSasKey { get => this._excelFileBlobSasKey; set => this._excelFileBlobSasKey = value; } + + /// Backing field for property. + private string _excelFileBlobUrl; + + /// URL of the blob into which the ExcelFile is uploaded. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ExcelFileBlobUrl { get => this._excelFileBlobUrl; set => this._excelFileBlobUrl = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseInternal)__operationResultInfoBase).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseInternal)__operationResultInfoBase).ObjectType = value ; } + + /// Creates an new instance. + public ExportJobsOperationResultInfo() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__operationResultInfoBase), __operationResultInfoBase); + await eventListener.AssertObjectIsValid(nameof(__operationResultInfoBase), __operationResultInfoBase); + } + } + /// This class is used to send blob details after exporting jobs. + public partial interface IExportJobsOperationResultInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase + { + /// SAS key to access the blob. It expires in 15 mins. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SAS key to access the blob. It expires in 15 mins.", + SerializedName = @"blobSasKey", + PossibleTypes = new [] { typeof(string) })] + string BlobSasKey { get; set; } + /// URL of the blob into which the serialized string of list of jobs is exported. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL of the blob into which the serialized string of list of jobs is exported.", + SerializedName = @"blobUrl", + PossibleTypes = new [] { typeof(string) })] + string BlobUrl { get; set; } + /// SAS key to access the blob. It expires in 15 mins. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SAS key to access the blob. It expires in 15 mins.", + SerializedName = @"excelFileBlobSasKey", + PossibleTypes = new [] { typeof(string) })] + string ExcelFileBlobSasKey { get; set; } + /// URL of the blob into which the ExcelFile is uploaded. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL of the blob into which the ExcelFile is uploaded.", + SerializedName = @"excelFileBlobUrl", + PossibleTypes = new [] { typeof(string) })] + string ExcelFileBlobUrl { get; set; } + + } + /// This class is used to send blob details after exporting jobs. + internal partial interface IExportJobsOperationResultInfoInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseInternal + { + /// SAS key to access the blob. It expires in 15 mins. + string BlobSasKey { get; set; } + /// URL of the blob into which the serialized string of list of jobs is exported. + string BlobUrl { get; set; } + /// SAS key to access the blob. It expires in 15 mins. + string ExcelFileBlobSasKey { get; set; } + /// URL of the blob into which the ExcelFile is uploaded. + string ExcelFileBlobUrl { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExportJobsOperationResultInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExportJobsOperationResultInfo.json.cs new file mode 100644 index 000000000000..f07fdccf8be8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExportJobsOperationResultInfo.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// This class is used to send blob details after exporting jobs. + public partial class ExportJobsOperationResultInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ExportJobsOperationResultInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __operationResultInfoBase = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationResultInfoBase(json); + {_blobUrl = If( json?.PropertyT("blobUrl"), out var __jsonBlobUrl) ? (string)__jsonBlobUrl : (string)BlobUrl;} + {_blobSasKey = If( json?.PropertyT("blobSasKey"), out var __jsonBlobSasKey) ? (string)__jsonBlobSasKey : (string)BlobSasKey;} + {_excelFileBlobUrl = If( json?.PropertyT("excelFileBlobUrl"), out var __jsonExcelFileBlobUrl) ? (string)__jsonExcelFileBlobUrl : (string)ExcelFileBlobUrl;} + {_excelFileBlobSasKey = If( json?.PropertyT("excelFileBlobSasKey"), out var __jsonExcelFileBlobSasKey) ? (string)__jsonExcelFileBlobSasKey : (string)ExcelFileBlobSasKey;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExportJobsOperationResultInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExportJobsOperationResultInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExportJobsOperationResultInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ExportJobsOperationResultInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __operationResultInfoBase?.ToJson(container, serializationMode); + AddIf( null != (((object)this._blobUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._blobUrl.ToString()) : null, "blobUrl" ,container.Add ); + AddIf( null != (((object)this._blobSasKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._blobSasKey.ToString()) : null, "blobSasKey" ,container.Add ); + AddIf( null != (((object)this._excelFileBlobUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._excelFileBlobUrl.ToString()) : null, "excelFileBlobUrl" ,container.Add ); + AddIf( null != (((object)this._excelFileBlobSasKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._excelFileBlobSasKey.ToString()) : null, "excelFileBlobSasKey" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedLocation.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedLocation.cs new file mode 100644 index 000000000000..bd5dfd18a9e1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedLocation.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The extended location of Recovery point where VM was present. + public partial class ExtendedLocation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocationInternal + { + + /// Backing field for property. + private string _name; + + /// Name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _type; + + /// Type of the extended location. Possible values include: 'EdgeZone' + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public ExtendedLocation() + { + + } + } + /// The extended location of Recovery point where VM was present. + public partial interface IExtendedLocation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the extended location.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Type of the extended location. Possible values include: 'EdgeZone' + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the extended location. Possible values include: 'EdgeZone'", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// The extended location of Recovery point where VM was present. + internal partial interface IExtendedLocationInternal + + { + /// Name of the extended location. + string Name { get; set; } + /// Type of the extended location. Possible values include: 'EdgeZone' + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedLocation.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedLocation.json.cs new file mode 100644 index 000000000000..5b033bd7453d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedLocation.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The extended location of Recovery point where VM was present. + public partial class ExtendedLocation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ExtendedLocation(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ExtendedLocation(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + 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 ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedProperties.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedProperties.cs new file mode 100644 index 000000000000..5fe0faea4959 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedProperties.cs @@ -0,0 +1,91 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Extended Properties for Azure IaasVM Backup. + public partial class ExtendedProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties _diskExclusionProperty; + + /// Extended Properties for Disk Exclusion. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties DiskExclusionProperty { get => (this._diskExclusionProperty = this._diskExclusionProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DiskExclusionProperties()); set => this._diskExclusionProperty = value; } + + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int[] DiskExclusionPropertyDiskLunList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionPropertiesInternal)DiskExclusionProperty).DiskLunList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionPropertiesInternal)DiskExclusionProperty).DiskLunList = value ?? null /* arrayOf */; } + + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? DiskExclusionPropertyIsInclusionList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionPropertiesInternal)DiskExclusionProperty).IsInclusionList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionPropertiesInternal)DiskExclusionProperty).IsInclusionList = value ?? default(bool); } + + /// Backing field for property. + private string _linuxVMApplicationName; + + /// Linux VM name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LinuxVMApplicationName { get => this._linuxVMApplicationName; set => this._linuxVMApplicationName = value; } + + /// Internal Acessors for DiskExclusionProperty + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedPropertiesInternal.DiskExclusionProperty { get => (this._diskExclusionProperty = this._diskExclusionProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DiskExclusionProperties()); set { {_diskExclusionProperty = value;} } } + + /// Creates an new instance. + public ExtendedProperties() + { + + } + } + /// Extended Properties for Azure IaasVM Backup. + public partial interface IExtendedProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection.", + SerializedName = @"diskLunList", + PossibleTypes = new [] { typeof(int) })] + int[] DiskExclusionPropertyDiskLunList { get; set; } + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to indicate whether DiskLunList is to be included/ excluded from backup.", + SerializedName = @"isInclusionList", + PossibleTypes = new [] { typeof(bool) })] + bool? DiskExclusionPropertyIsInclusionList { get; set; } + /// Linux VM name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Linux VM name", + SerializedName = @"linuxVmApplicationName", + PossibleTypes = new [] { typeof(string) })] + string LinuxVMApplicationName { get; set; } + + } + /// Extended Properties for Azure IaasVM Backup. + internal partial interface IExtendedPropertiesInternal + + { + /// Extended Properties for Disk Exclusion. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskExclusionProperties DiskExclusionProperty { get; set; } + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + int[] DiskExclusionPropertyDiskLunList { get; set; } + /// Flag to indicate whether DiskLunList is to be included/ excluded from backup. + bool? DiskExclusionPropertyIsInclusionList { get; set; } + /// Linux VM name + string LinuxVMApplicationName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedProperties.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedProperties.json.cs new file mode 100644 index 000000000000..7a486af200a3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ExtendedProperties.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Extended Properties for Azure IaasVM Backup. + public partial class ExtendedProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ExtendedProperties(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_diskExclusionProperty = If( json?.PropertyT("diskExclusionProperties"), out var __jsonDiskExclusionProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DiskExclusionProperties.FromJson(__jsonDiskExclusionProperties) : DiskExclusionProperty;} + {_linuxVMApplicationName = If( json?.PropertyT("linuxVmApplicationName"), out var __jsonLinuxVMApplicationName) ? (string)__jsonLinuxVMApplicationName : (string)LinuxVMApplicationName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ExtendedProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._diskExclusionProperty ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._diskExclusionProperty.ToJson(null,serializationMode) : null, "diskExclusionProperties" ,container.Add ); + AddIf( null != (((object)this._linuxVMApplicationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._linuxVMApplicationName.ToString()) : null, "linuxVmApplicationName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FeatureSupportRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FeatureSupportRequest.cs new file mode 100644 index 000000000000..24aa43243cea --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FeatureSupportRequest.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for feature request + public partial class FeatureSupportRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequestInternal + { + + /// Backing field for property. + private string _featureType; + + /// backup support feature type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FeatureType { get => this._featureType; set => this._featureType = value; } + + /// Creates an new instance. + public FeatureSupportRequest() + { + + } + } + /// Base class for feature request + public partial interface IFeatureSupportRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// backup support feature type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"backup support feature type.", + SerializedName = @"featureType", + PossibleTypes = new [] { typeof(string) })] + string FeatureType { get; set; } + + } + /// Base class for feature request + internal partial interface IFeatureSupportRequestInternal + + { + /// backup support feature type. + string FeatureType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FeatureSupportRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FeatureSupportRequest.json.cs new file mode 100644 index 000000000000..46ead7001227 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FeatureSupportRequest.json.cs @@ -0,0 +1,127 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for feature request + public partial class FeatureSupportRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal FeatureSupportRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_featureType = If( json?.PropertyT("featureType"), out var __jsonFeatureType) ? (string)__jsonFeatureType : (string)FeatureType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("featureType") ) + { + case "AzureBackupGoals": + { + return new AzureBackupGoalFeatureSupportRequest(json); + } + case "AzureVMResourceBackup": + { + return new AzureVMResourceFeatureSupportRequest(json); + } + } + return new FeatureSupportRequest(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._featureType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._featureType.ToString()) : null, "featureType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoForRehydrationRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoForRehydrationRequest.cs new file mode 100644 index 000000000000..ddd81c474071 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoForRehydrationRequest.cs @@ -0,0 +1,137 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request parameters for fetching cost info of rehydration + public partial class FetchTieringCostInfoForRehydrationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoForRehydrationRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoForRehydrationRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest __fetchTieringCostInfoRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FetchTieringCostInfoRequest(); + + /// Backing field for property. + private string _containerName; + + /// Name of the protected item container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).ObjectType = value ; } + + /// Backing field for property. + private string _protectedItemName; + + /// Name of the protectedItemName + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectedItemName { get => this._protectedItemName; set => this._protectedItemName = value; } + + /// Backing field for property. + private string _recoveryPointId; + + /// ID of the backup copy for rehydration cost info needs to be fetched. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointId { get => this._recoveryPointId; set => this._recoveryPointId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority _rehydrationPriority; + + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority RehydrationPriority { get => this._rehydrationPriority; set => this._rehydrationPriority = value; } + + /// Source tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType SourceTierType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).SourceTierType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).SourceTierType = value ; } + + /// target tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType TargetTierType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).TargetTierType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).TargetTierType = value ; } + + /// + /// Creates an new instance. + /// + public FetchTieringCostInfoForRehydrationRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__fetchTieringCostInfoRequest), __fetchTieringCostInfoRequest); + await eventListener.AssertObjectIsValid(nameof(__fetchTieringCostInfoRequest), __fetchTieringCostInfoRequest); + } + } + /// Request parameters for fetching cost info of rehydration + public partial interface IFetchTieringCostInfoForRehydrationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest + { + /// Name of the protected item container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the protected item container", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// Name of the protectedItemName + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the protectedItemName", + SerializedName = @"protectedItemName", + PossibleTypes = new [] { typeof(string) })] + string ProtectedItemName { get; set; } + /// ID of the backup copy for rehydration cost info needs to be fetched. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"ID of the backup copy for rehydration cost info needs to be fetched.", + SerializedName = @"recoveryPointId", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointId { get; set; } + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Rehydration Priority", + SerializedName = @"rehydrationPriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority RehydrationPriority { get; set; } + + } + /// Request parameters for fetching cost info of rehydration + internal partial interface IFetchTieringCostInfoForRehydrationRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal + { + /// Name of the protected item container + string ContainerName { get; set; } + /// Name of the protectedItemName + string ProtectedItemName { get; set; } + /// ID of the backup copy for rehydration cost info needs to be fetched. + string RecoveryPointId { get; set; } + /// Rehydration Priority + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority RehydrationPriority { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoForRehydrationRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoForRehydrationRequest.json.cs new file mode 100644 index 000000000000..068bb22d4bab --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoForRehydrationRequest.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request parameters for fetching cost info of rehydration + public partial class FetchTieringCostInfoForRehydrationRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal FetchTieringCostInfoForRehydrationRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __fetchTieringCostInfoRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FetchTieringCostInfoRequest(json); + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_protectedItemName = If( json?.PropertyT("protectedItemName"), out var __jsonProtectedItemName) ? (string)__jsonProtectedItemName : (string)ProtectedItemName;} + {_recoveryPointId = If( json?.PropertyT("recoveryPointId"), out var __jsonRecoveryPointId) ? (string)__jsonRecoveryPointId : (string)RecoveryPointId;} + {_rehydrationPriority = If( json?.PropertyT("rehydrationPriority"), out var __jsonRehydrationPriority) ? (string)__jsonRehydrationPriority : (string)RehydrationPriority;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoForRehydrationRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoForRehydrationRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoForRehydrationRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new FetchTieringCostInfoForRehydrationRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __fetchTieringCostInfoRequest?.ToJson(container, serializationMode); + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != (((object)this._protectedItemName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectedItemName.ToString()) : null, "protectedItemName" ,container.Add ); + AddIf( null != (((object)this._recoveryPointId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointId.ToString()) : null, "recoveryPointId" ,container.Add ); + AddIf( null != (((object)this._rehydrationPriority)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._rehydrationPriority.ToString()) : null, "rehydrationPriority" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoRequest.cs new file mode 100644 index 000000000000..2503d4c94ee9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoRequest.cs @@ -0,0 +1,96 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for tiering cost request. + /// Specific cost request types are derived from this class. + /// + public partial class FetchTieringCostInfoRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType _sourceTierType; + + /// Source tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType SourceTierType { get => this._sourceTierType; set => this._sourceTierType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType _targetTierType; + + /// target tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType TargetTierType { get => this._targetTierType; set => this._targetTierType = value; } + + /// Creates an new instance. + public FetchTieringCostInfoRequest() + { + + } + } + /// Base class for tiering cost request. + /// Specific cost request types are derived from this class. + public partial interface IFetchTieringCostInfoRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + /// Source tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Source tier for the request", + SerializedName = @"sourceTierType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType SourceTierType { get; set; } + /// target tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"target tier for the request", + SerializedName = @"targetTierType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType TargetTierType { get; set; } + + } + /// Base class for tiering cost request. + /// Specific cost request types are derived from this class. + internal partial interface IFetchTieringCostInfoRequestInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + /// Source tier for the request + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType SourceTierType { get; set; } + /// target tier for the request + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType TargetTierType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoRequest.json.cs new file mode 100644 index 000000000000..c6dc12080135 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostInfoRequest.json.cs @@ -0,0 +1,142 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for tiering cost request. + /// Specific cost request types are derived from this class. + /// + public partial class FetchTieringCostInfoRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal FetchTieringCostInfoRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_sourceTierType = If( json?.PropertyT("sourceTierType"), out var __jsonSourceTierType) ? (string)__jsonSourceTierType : (string)SourceTierType;} + {_targetTierType = If( json?.PropertyT("targetTierType"), out var __jsonTargetTierType) ? (string)__jsonTargetTierType : (string)TargetTierType;} + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "FetchTieringCostInfoForRehydrationRequest": + { + return new FetchTieringCostInfoForRehydrationRequest(json); + } + case "FetchTieringCostSavingsInfoForPolicyRequest": + { + return new FetchTieringCostSavingsInfoForPolicyRequest(json); + } + case "FetchTieringCostSavingsInfoForProtectedItemRequest": + { + return new FetchTieringCostSavingsInfoForProtectedItemRequest(json); + } + case "FetchTieringCostSavingsInfoForVaultRequest": + { + return new FetchTieringCostSavingsInfoForVaultRequest(json); + } + } + return new FetchTieringCostInfoRequest(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._sourceTierType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceTierType.ToString()) : null, "sourceTierType" ,container.Add ); + AddIf( null != (((object)this._targetTierType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetTierType.ToString()) : null, "targetTierType" ,container.Add ); + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForPolicyRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForPolicyRequest.cs new file mode 100644 index 000000000000..7bf57c11910e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForPolicyRequest.cs @@ -0,0 +1,86 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request parameters for tiering cost info for policy + public partial class FetchTieringCostSavingsInfoForPolicyRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForPolicyRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForPolicyRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest __fetchTieringCostInfoRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FetchTieringCostInfoRequest(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).ObjectType = value ; } + + /// Backing field for property. + private string _policyName; + + /// Name of the backup policy for which the cost savings information is requested + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyName { get => this._policyName; set => this._policyName = value; } + + /// Source tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType SourceTierType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).SourceTierType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).SourceTierType = value ; } + + /// target tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType TargetTierType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).TargetTierType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).TargetTierType = value ; } + + /// + /// Creates an new instance. + /// + public FetchTieringCostSavingsInfoForPolicyRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__fetchTieringCostInfoRequest), __fetchTieringCostInfoRequest); + await eventListener.AssertObjectIsValid(nameof(__fetchTieringCostInfoRequest), __fetchTieringCostInfoRequest); + } + } + /// Request parameters for tiering cost info for policy + public partial interface IFetchTieringCostSavingsInfoForPolicyRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest + { + /// Name of the backup policy for which the cost savings information is requested + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the backup policy for which the cost savings information is requested", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; set; } + + } + /// Request parameters for tiering cost info for policy + internal partial interface IFetchTieringCostSavingsInfoForPolicyRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal + { + /// Name of the backup policy for which the cost savings information is requested + string PolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForPolicyRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForPolicyRequest.json.cs new file mode 100644 index 000000000000..25357cb979ec --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForPolicyRequest.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request parameters for tiering cost info for policy + public partial class FetchTieringCostSavingsInfoForPolicyRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal FetchTieringCostSavingsInfoForPolicyRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __fetchTieringCostInfoRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FetchTieringCostInfoRequest(json); + {_policyName = If( json?.PropertyT("policyName"), out var __jsonPolicyName) ? (string)__jsonPolicyName : (string)PolicyName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForPolicyRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForPolicyRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForPolicyRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new FetchTieringCostSavingsInfoForPolicyRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __fetchTieringCostInfoRequest?.ToJson(container, serializationMode); + AddIf( null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForProtectedItemRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForProtectedItemRequest.cs new file mode 100644 index 000000000000..68455b6847dc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForProtectedItemRequest.cs @@ -0,0 +1,103 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request parameters for tiering cost info for protected item + public partial class FetchTieringCostSavingsInfoForProtectedItemRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForProtectedItemRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForProtectedItemRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest __fetchTieringCostInfoRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FetchTieringCostInfoRequest(); + + /// Backing field for property. + private string _containerName; + + /// Name of the protected item container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).ObjectType = value ; } + + /// Backing field for property. + private string _protectedItemName; + + /// Name of the protectedItemName + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectedItemName { get => this._protectedItemName; set => this._protectedItemName = value; } + + /// Source tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType SourceTierType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).SourceTierType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).SourceTierType = value ; } + + /// target tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType TargetTierType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).TargetTierType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).TargetTierType = value ; } + + /// + /// Creates an new instance. + /// + public FetchTieringCostSavingsInfoForProtectedItemRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__fetchTieringCostInfoRequest), __fetchTieringCostInfoRequest); + await eventListener.AssertObjectIsValid(nameof(__fetchTieringCostInfoRequest), __fetchTieringCostInfoRequest); + } + } + /// Request parameters for tiering cost info for protected item + public partial interface IFetchTieringCostSavingsInfoForProtectedItemRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest + { + /// Name of the protected item container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the protected item container", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// Name of the protectedItemName + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the protectedItemName", + SerializedName = @"protectedItemName", + PossibleTypes = new [] { typeof(string) })] + string ProtectedItemName { get; set; } + + } + /// Request parameters for tiering cost info for protected item + internal partial interface IFetchTieringCostSavingsInfoForProtectedItemRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal + { + /// Name of the protected item container + string ContainerName { get; set; } + /// Name of the protectedItemName + string ProtectedItemName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForProtectedItemRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForProtectedItemRequest.json.cs new file mode 100644 index 000000000000..f602c9f642cd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForProtectedItemRequest.json.cs @@ -0,0 +1,115 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request parameters for tiering cost info for protected item + public partial class FetchTieringCostSavingsInfoForProtectedItemRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal FetchTieringCostSavingsInfoForProtectedItemRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __fetchTieringCostInfoRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FetchTieringCostInfoRequest(json); + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_protectedItemName = If( json?.PropertyT("protectedItemName"), out var __jsonProtectedItemName) ? (string)__jsonProtectedItemName : (string)ProtectedItemName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForProtectedItemRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForProtectedItemRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForProtectedItemRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new FetchTieringCostSavingsInfoForProtectedItemRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __fetchTieringCostInfoRequest?.ToJson(container, serializationMode); + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != (((object)this._protectedItemName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectedItemName.ToString()) : null, "protectedItemName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForVaultRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForVaultRequest.cs new file mode 100644 index 000000000000..e905e5e08622 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForVaultRequest.cs @@ -0,0 +1,69 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request parameters for tiering cost info for vault + public partial class FetchTieringCostSavingsInfoForVaultRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForVaultRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForVaultRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest __fetchTieringCostInfoRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FetchTieringCostInfoRequest(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).ObjectType = value ; } + + /// Source tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType SourceTierType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).SourceTierType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).SourceTierType = value ; } + + /// target tier for the request + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType TargetTierType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).TargetTierType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal)__fetchTieringCostInfoRequest).TargetTierType = value ; } + + /// + /// Creates an new instance. + /// + public FetchTieringCostSavingsInfoForVaultRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__fetchTieringCostInfoRequest), __fetchTieringCostInfoRequest); + await eventListener.AssertObjectIsValid(nameof(__fetchTieringCostInfoRequest), __fetchTieringCostInfoRequest); + } + } + /// Request parameters for tiering cost info for vault + public partial interface IFetchTieringCostSavingsInfoForVaultRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest + { + + } + /// Request parameters for tiering cost info for vault + internal partial interface IFetchTieringCostSavingsInfoForVaultRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequestInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForVaultRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForVaultRequest.json.cs new file mode 100644 index 000000000000..399ea4ca573c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/FetchTieringCostSavingsInfoForVaultRequest.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request parameters for tiering cost info for vault + public partial class FetchTieringCostSavingsInfoForVaultRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal FetchTieringCostSavingsInfoForVaultRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __fetchTieringCostInfoRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.FetchTieringCostInfoRequest(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForVaultRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForVaultRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostSavingsInfoForVaultRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new FetchTieringCostSavingsInfoForVaultRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __fetchTieringCostInfoRequest?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainer.cs new file mode 100644 index 000000000000..f2844ebf1f8d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainer.cs @@ -0,0 +1,200 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for generic container of backup items + public partial class GenericContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Protection container identity - AAD Tenant + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerIdentityInfoAadTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfoAadTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfoAadTenantId = value ?? null; } + + /// Protection container identity - Audience + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerIdentityInfoAudience { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfoAudience; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfoAudience = value ?? null; } + + /// Protection container identity - AAD Service Principal + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerIdentityInfoServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfoServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfoServicePrincipalClientId = value ?? null; } + + /// Unique name of the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerIdentityInfoUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfoUniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfoUniqueName = value ?? null; } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfo _extendedInformation; + + /// Extended information (not returned in List container API calls) + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfo ExtendedInformation { get => (this._extendedInformation = this._extendedInformation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.GenericContainerExtendedInfo()); set => this._extendedInformation = value; } + + /// Public key of container cert + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInformationRawCertData { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).RawCertData; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).RawCertData = value ?? null; } + + /// Azure Backup Service Endpoints for the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints ExtendedInformationServiceEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ServiceEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ServiceEndpoint = value ?? null /* model class */; } + + /// Backing field for property. + private string _fabricName; + + /// Name of the container's fabric + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FabricName { get => this._fabricName; set => this._fabricName = value; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus = value ?? null; } + + /// Internal Acessors for ExtendedInformation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerInternal.ExtendedInformation { get => (this._extendedInformation = this._extendedInformation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.GenericContainerExtendedInfo()); set { {_extendedInformation = value;} } } + + /// Internal Acessors for ExtendedInformationContainerIdentityInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerInternal.ExtendedInformationContainerIdentityInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal)ExtendedInformation).ContainerIdentityInfo = value; } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus = value ?? null; } + + /// Creates an new instance. + public GenericContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionContainer), __protectionContainer); + await eventListener.AssertObjectIsValid(nameof(__protectionContainer), __protectionContainer); + } + } + /// Base class for generic container of backup items + public partial interface IGenericContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer + { + /// Protection container identity - AAD Tenant + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection container identity - AAD Tenant", + SerializedName = @"aadTenantId", + PossibleTypes = new [] { typeof(string) })] + string ContainerIdentityInfoAadTenantId { get; set; } + /// Protection container identity - Audience + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection container identity - Audience", + SerializedName = @"audience", + PossibleTypes = new [] { typeof(string) })] + string ContainerIdentityInfoAudience { get; set; } + /// Protection container identity - AAD Service Principal + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection container identity - AAD Service Principal", + SerializedName = @"servicePrincipalClientId", + PossibleTypes = new [] { typeof(string) })] + string ContainerIdentityInfoServicePrincipalClientId { get; set; } + /// Unique name of the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Unique name of the container", + SerializedName = @"uniqueName", + PossibleTypes = new [] { typeof(string) })] + string ContainerIdentityInfoUniqueName { get; set; } + /// Public key of container cert + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Public key of container cert", + SerializedName = @"rawCertData", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInformationRawCertData { get; set; } + /// Azure Backup Service Endpoints for the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Azure Backup Service Endpoints for the container", + SerializedName = @"serviceEndpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints ExtendedInformationServiceEndpoint { get; set; } + /// Name of the container's fabric + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the container's fabric", + SerializedName = @"fabricName", + PossibleTypes = new [] { typeof(string) })] + string FabricName { get; set; } + + } + /// Base class for generic container of backup items + internal partial interface IGenericContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal + { + /// Protection container identity - AAD Tenant + string ContainerIdentityInfoAadTenantId { get; set; } + /// Protection container identity - Audience + string ContainerIdentityInfoAudience { get; set; } + /// Protection container identity - AAD Service Principal + string ContainerIdentityInfoServicePrincipalClientId { get; set; } + /// Unique name of the container + string ContainerIdentityInfoUniqueName { get; set; } + /// Extended information (not returned in List container API calls) + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfo ExtendedInformation { get; set; } + /// Container identity information + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo ExtendedInformationContainerIdentityInfo { get; set; } + /// Public key of container cert + string ExtendedInformationRawCertData { get; set; } + /// Azure Backup Service Endpoints for the container + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints ExtendedInformationServiceEndpoint { get; set; } + /// Name of the container's fabric + string FabricName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainer.json.cs new file mode 100644 index 000000000000..9b1887228fe5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainer.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for generic container of backup items + public partial class GenericContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new GenericContainer(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal GenericContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(json); + {_extendedInformation = If( json?.PropertyT("extendedInformation"), out var __jsonExtendedInformation) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.GenericContainerExtendedInfo.FromJson(__jsonExtendedInformation) : ExtendedInformation;} + {_fabricName = If( json?.PropertyT("fabricName"), out var __jsonFabricName) ? (string)__jsonFabricName : (string)FabricName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionContainer?.ToJson(container, serializationMode); + AddIf( null != this._extendedInformation ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInformation.ToJson(null,serializationMode) : null, "extendedInformation" ,container.Add ); + AddIf( null != (((object)this._fabricName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fabricName.ToString()) : null, "fabricName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfo.cs new file mode 100644 index 000000000000..feda6e38de65 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfo.cs @@ -0,0 +1,136 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container extended information + public partial class GenericContainerExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo _containerIdentityInfo; + + /// Container identity information + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo ContainerIdentityInfo { get => (this._containerIdentityInfo = this._containerIdentityInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ContainerIdentityInfo()); set => this._containerIdentityInfo = value; } + + /// Protection container identity - AAD Tenant + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerIdentityInfoAadTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfoInternal)ContainerIdentityInfo).AadTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfoInternal)ContainerIdentityInfo).AadTenantId = value ?? null; } + + /// Protection container identity - Audience + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerIdentityInfoAudience { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfoInternal)ContainerIdentityInfo).Audience; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfoInternal)ContainerIdentityInfo).Audience = value ?? null; } + + /// Protection container identity - AAD Service Principal + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerIdentityInfoServicePrincipalClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfoInternal)ContainerIdentityInfo).ServicePrincipalClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfoInternal)ContainerIdentityInfo).ServicePrincipalClientId = value ?? null; } + + /// Unique name of the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerIdentityInfoUniqueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfoInternal)ContainerIdentityInfo).UniqueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfoInternal)ContainerIdentityInfo).UniqueName = value ?? null; } + + /// Internal Acessors for ContainerIdentityInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoInternal.ContainerIdentityInfo { get => (this._containerIdentityInfo = this._containerIdentityInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ContainerIdentityInfo()); set { {_containerIdentityInfo = value;} } } + + /// Backing field for property. + private string _rawCertData; + + /// Public key of container cert + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RawCertData { get => this._rawCertData; set => this._rawCertData = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints _serviceEndpoint; + + /// Azure Backup Service Endpoints for the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints ServiceEndpoint { get => (this._serviceEndpoint = this._serviceEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.GenericContainerExtendedInfoServiceEndpoints()); set => this._serviceEndpoint = value; } + + /// Creates an new instance. + public GenericContainerExtendedInfo() + { + + } + } + /// Container extended information + public partial interface IGenericContainerExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Protection container identity - AAD Tenant + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection container identity - AAD Tenant", + SerializedName = @"aadTenantId", + PossibleTypes = new [] { typeof(string) })] + string ContainerIdentityInfoAadTenantId { get; set; } + /// Protection container identity - Audience + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection container identity - Audience", + SerializedName = @"audience", + PossibleTypes = new [] { typeof(string) })] + string ContainerIdentityInfoAudience { get; set; } + /// Protection container identity - AAD Service Principal + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protection container identity - AAD Service Principal", + SerializedName = @"servicePrincipalClientId", + PossibleTypes = new [] { typeof(string) })] + string ContainerIdentityInfoServicePrincipalClientId { get; set; } + /// Unique name of the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Unique name of the container", + SerializedName = @"uniqueName", + PossibleTypes = new [] { typeof(string) })] + string ContainerIdentityInfoUniqueName { get; set; } + /// Public key of container cert + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Public key of container cert", + SerializedName = @"rawCertData", + PossibleTypes = new [] { typeof(string) })] + string RawCertData { get; set; } + /// Azure Backup Service Endpoints for the container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Azure Backup Service Endpoints for the container", + SerializedName = @"serviceEndpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints ServiceEndpoint { get; set; } + + } + /// Container extended information + internal partial interface IGenericContainerExtendedInfoInternal + + { + /// Container identity information + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IContainerIdentityInfo ContainerIdentityInfo { get; set; } + /// Protection container identity - AAD Tenant + string ContainerIdentityInfoAadTenantId { get; set; } + /// Protection container identity - Audience + string ContainerIdentityInfoAudience { get; set; } + /// Protection container identity - AAD Service Principal + string ContainerIdentityInfoServicePrincipalClientId { get; set; } + /// Unique name of the container + string ContainerIdentityInfoUniqueName { get; set; } + /// Public key of container cert + string RawCertData { get; set; } + /// Azure Backup Service Endpoints for the container + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints ServiceEndpoint { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfo.json.cs new file mode 100644 index 000000000000..75836dd6b4d8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfo.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container extended information + public partial class GenericContainerExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new GenericContainerExtendedInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal GenericContainerExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_containerIdentityInfo = If( json?.PropertyT("containerIdentityInfo"), out var __jsonContainerIdentityInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ContainerIdentityInfo.FromJson(__jsonContainerIdentityInfo) : ContainerIdentityInfo;} + {_rawCertData = If( json?.PropertyT("rawCertData"), out var __jsonRawCertData) ? (string)__jsonRawCertData : (string)RawCertData;} + {_serviceEndpoint = If( json?.PropertyT("serviceEndpoints"), out var __jsonServiceEndpoints) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.GenericContainerExtendedInfoServiceEndpoints.FromJson(__jsonServiceEndpoints) : ServiceEndpoint;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._containerIdentityInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._containerIdentityInfo.ToJson(null,serializationMode) : null, "containerIdentityInfo" ,container.Add ); + AddIf( null != (((object)this._rawCertData)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._rawCertData.ToString()) : null, "rawCertData" ,container.Add ); + AddIf( null != this._serviceEndpoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._serviceEndpoint.ToJson(null,serializationMode) : null, "serviceEndpoints" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfoServiceEndpoints.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfoServiceEndpoints.cs new file mode 100644 index 000000000000..b1b8ea5b010b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfoServiceEndpoints.cs @@ -0,0 +1,37 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Backup Service Endpoints for the container + public partial class GenericContainerExtendedInfoServiceEndpoints : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpointsInternal + { + + /// + /// Creates an new instance. + /// + public GenericContainerExtendedInfoServiceEndpoints() + { + + } + } + /// Azure Backup Service Endpoints for the container + public partial interface IGenericContainerExtendedInfoServiceEndpoints : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Azure Backup Service Endpoints for the container + internal partial interface IGenericContainerExtendedInfoServiceEndpointsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfoServiceEndpoints.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfoServiceEndpoints.dictionary.cs new file mode 100644 index 000000000000..3cfec6928645 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfoServiceEndpoints.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class GenericContainerExtendedInfoServiceEndpoints : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.GenericContainerExtendedInfoServiceEndpoints source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfoServiceEndpoints.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfoServiceEndpoints.json.cs new file mode 100644 index 000000000000..91bd013cad3e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericContainerExtendedInfoServiceEndpoints.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure Backup Service Endpoints for the container + public partial class GenericContainerExtendedInfoServiceEndpoints + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericContainerExtendedInfoServiceEndpoints FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new GenericContainerExtendedInfoServiceEndpoints(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal GenericContainerExtendedInfoServiceEndpoints(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItem.cs new file mode 100644 index 000000000000..52dbaf9d73bc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItem.cs @@ -0,0 +1,248 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup items. + public partial class GenericProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Backing field for property. + private string _fabricName; + + /// Name of this backup item's fabric. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FabricName { get => this._fabricName; set => this._fabricName = value; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType = value; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName = value ?? null; } + + /// Backing field for property. + private string _policyState; + + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyState { get => this._policyState; set => this._policyState = value; } + + /// Backing field for property. + private long? _protectedItemId; + + /// Data Plane Service ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? ProtectedItemId { get => this._protectedItemId; set => this._protectedItemId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? _protectionState; + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociations _sourceAssociation; + + /// + /// Loosely coupled (type, value) associations (example - parent of a protected item) + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociations SourceAssociation { get => (this._sourceAssociation = this._sourceAssociation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.GenericProtectedItemSourceAssociations()); set => this._sourceAssociation = value; } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; } + + /// Creates an new instance. + public GenericProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectedItem), __protectedItem); + await eventListener.AssertObjectIsValid(nameof(__protectedItem), __protectedItem); + } + } + /// Base class for backup items. + public partial interface IGenericProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem + { + /// Name of this backup item's fabric. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of this backup item's fabric.", + SerializedName = @"fabricName", + PossibleTypes = new [] { typeof(string) })] + string FabricName { get; set; } + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the container.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates consistency of policy object and policy applied to this backup item.", + SerializedName = @"policyState", + PossibleTypes = new [] { typeof(string) })] + string PolicyState { get; set; } + /// Data Plane Service ID of the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Data Plane Service ID of the protected item.", + SerializedName = @"protectedItemId", + PossibleTypes = new [] { typeof(long) })] + long? ProtectedItemId { get; set; } + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup state of this backup item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get; set; } + /// + /// Loosely coupled (type, value) associations (example - parent of a protected item) + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Loosely coupled (type, value) associations (example - parent of a protected item)", + SerializedName = @"sourceAssociations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociations) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociations SourceAssociation { get; set; } + + } + /// Base class for backup items. + internal partial interface IGenericProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal + { + /// Name of this backup item's fabric. + string FabricName { get; set; } + /// Friendly name of the container. + string FriendlyName { get; set; } + /// Indicates consistency of policy object and policy applied to this backup item. + string PolicyState { get; set; } + /// Data Plane Service ID of the protected item. + long? ProtectedItemId { get; set; } + /// Backup state of this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState? ProtectionState { get; set; } + /// + /// Loosely coupled (type, value) associations (example - parent of a protected item) + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociations SourceAssociation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItem.json.cs new file mode 100644 index 000000000000..b7d7a84396aa --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItem.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup items. + public partial class GenericProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new GenericProtectedItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal GenericProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(json); + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_policyState = If( json?.PropertyT("policyState"), out var __jsonPolicyState) ? (string)__jsonPolicyState : (string)PolicyState;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + {_protectedItemId = If( json?.PropertyT("protectedItemId"), out var __jsonProtectedItemId) ? (long?)__jsonProtectedItemId : ProtectedItemId;} + {_sourceAssociation = If( json?.PropertyT("sourceAssociations"), out var __jsonSourceAssociations) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.GenericProtectedItemSourceAssociations.FromJson(__jsonSourceAssociations) : SourceAssociation;} + {_fabricName = If( json?.PropertyT("fabricName"), out var __jsonFabricName) ? (string)__jsonFabricName : (string)FabricName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectedItem?.ToJson(container, serializationMode); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._policyState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyState.ToString()) : null, "policyState" ,container.Add ); + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + AddIf( null != this._protectedItemId ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._protectedItemId) : null, "protectedItemId" ,container.Add ); + AddIf( null != this._sourceAssociation ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._sourceAssociation.ToJson(null,serializationMode) : null, "sourceAssociations" ,container.Add ); + AddIf( null != (((object)this._fabricName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fabricName.ToString()) : null, "fabricName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItemSourceAssociations.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItemSourceAssociations.cs new file mode 100644 index 000000000000..1d3c10999950 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItemSourceAssociations.cs @@ -0,0 +1,37 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Loosely coupled (type, value) associations (example - parent of a protected item) + /// + public partial class GenericProtectedItemSourceAssociations : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociations, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociationsInternal + { + + /// Creates an new instance. + public GenericProtectedItemSourceAssociations() + { + + } + } + /// Loosely coupled (type, value) associations (example - parent of a protected item) + public partial interface IGenericProtectedItemSourceAssociations : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Loosely coupled (type, value) associations (example - parent of a protected item) + internal partial interface IGenericProtectedItemSourceAssociationsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItemSourceAssociations.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItemSourceAssociations.dictionary.cs new file mode 100644 index 000000000000..e455f6767a35 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItemSourceAssociations.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class GenericProtectedItemSourceAssociations : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.GenericProtectedItemSourceAssociations source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItemSourceAssociations.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItemSourceAssociations.json.cs new file mode 100644 index 000000000000..f4bbd8579175 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectedItemSourceAssociations.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Loosely coupled (type, value) associations (example - parent of a protected item) + /// + public partial class GenericProtectedItemSourceAssociations + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociations. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociations. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectedItemSourceAssociations FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new GenericProtectedItemSourceAssociations(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal GenericProtectedItemSourceAssociations(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectionPolicy.cs new file mode 100644 index 000000000000..6e5edbd35c7e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectionPolicy.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM (Mercury) workload-specific backup policy. + public partial class GenericProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectionPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType = value ; } + + /// Backing field for property. + private string _fabricName; + + /// Name of this policy's fabric. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FabricName { get => this._fabricName; set => this._fabricName = value; } + + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount = value ?? default(int); } + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy[] _subProtectionPolicy; + + /// List of sub-protection policies which includes schedule and retention + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy[] SubProtectionPolicy { get => this._subProtectionPolicy; set => this._subProtectionPolicy = value; } + + /// Backing field for property. + private string _timeZone; + + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Creates an new instance. + public GenericProtectionPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionPolicy), __protectionPolicy); + await eventListener.AssertObjectIsValid(nameof(__protectionPolicy), __protectionPolicy); + } + } + /// Azure VM (Mercury) workload-specific backup policy. + public partial interface IGenericProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy + { + /// Name of this policy's fabric. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of this policy's fabric.", + SerializedName = @"fabricName", + PossibleTypes = new [] { typeof(string) })] + string FabricName { get; set; } + /// List of sub-protection policies which includes schedule and retention + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of sub-protection policies which includes schedule and retention", + SerializedName = @"subProtectionPolicy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy[] SubProtectionPolicy { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"TimeZone optional input as string. For example: TimeZone = ""Pacific Standard Time"".", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + + } + /// Azure VM (Mercury) workload-specific backup policy. + internal partial interface IGenericProtectionPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal + { + /// Name of this policy's fabric. + string FabricName { get; set; } + /// List of sub-protection policies which includes schedule and retention + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy[] SubProtectionPolicy { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + string TimeZone { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectionPolicy.json.cs new file mode 100644 index 000000000000..0ed0b10ee22f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericProtectionPolicy.json.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Azure VM (Mercury) workload-specific backup policy. + public partial class GenericProtectionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericProtectionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new GenericProtectionPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal GenericProtectionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(json); + {_subProtectionPolicy = If( json?.PropertyT("subProtectionPolicy"), out var __jsonSubProtectionPolicy) ? If( __jsonSubProtectionPolicy as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SubProtectionPolicy.FromJson(__u) )) ))() : null : SubProtectionPolicy;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + {_fabricName = If( json?.PropertyT("fabricName"), out var __jsonFabricName) ? (string)__jsonFabricName : (string)FabricName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionPolicy?.ToJson(container, serializationMode); + if (null != this._subProtectionPolicy) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._subProtectionPolicy ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("subProtectionPolicy",__w); + } + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + AddIf( null != (((object)this._fabricName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fabricName.ToString()) : null, "fabricName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericRecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericRecoveryPoint.cs new file mode 100644 index 000000000000..188482a7e923 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericRecoveryPoint.cs @@ -0,0 +1,181 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Generic backup copy. + public partial class GenericRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericRecoveryPointInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint __recoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint(); + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Internal Acessors for RecoveryPointProperty + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericRecoveryPointInternal.RecoveryPointProperty { get => (this._recoveryPointProperty = this._recoveryPointProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties()); set { {_recoveryPointProperty = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__recoveryPoint).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__recoveryPoint).ObjectType = value ; } + + /// Backing field for property. + private string _recoveryPointAdditionalInfo; + + /// Additional information associated with this backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointAdditionalInfo { get => this._recoveryPointAdditionalInfo; set => this._recoveryPointAdditionalInfo = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties _recoveryPointProperty; + + /// Properties of Recovery Point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get => (this._recoveryPointProperty = this._recoveryPointProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties()); set => this._recoveryPointProperty = value; } + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointPropertyExpiryTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).ExpiryTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).ExpiryTime = value ?? null; } + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? RecoveryPointPropertyIsSoftDeleted { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).IsSoftDeleted; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).IsSoftDeleted = value ?? default(bool); } + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointPropertyRuleName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).RuleName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).RuleName = value ?? null; } + + /// Backing field for property. + private global::System.DateTime? _recoveryPointTime; + + /// Time at which this backup copy was created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? RecoveryPointTime { get => this._recoveryPointTime; set => this._recoveryPointTime = value; } + + /// Backing field for property. + private string _recoveryPointType; + + /// Type of the backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointType { get => this._recoveryPointType; set => this._recoveryPointType = value; } + + /// Creates an new instance. + public GenericRecoveryPoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__recoveryPoint), __recoveryPoint); + await eventListener.AssertObjectIsValid(nameof(__recoveryPoint), __recoveryPoint); + } + } + /// Generic backup copy. + public partial interface IGenericRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint + { + /// Friendly name of the backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the backup copy.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Additional information associated with this backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information associated with this backup copy.", + SerializedName = @"recoveryPointAdditionalInfo", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointAdditionalInfo { get; set; } + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Expiry time of Recovery Point in UTC.", + SerializedName = @"expiryTime", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointPropertyExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Bool to indicate whether RP is in soft delete state or not", + SerializedName = @"isSoftDeleted", + PossibleTypes = new [] { typeof(bool) })] + bool? RecoveryPointPropertyIsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rule name tagged on Recovery Point that governs life cycle", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointPropertyRuleName { get; set; } + /// Time at which this backup copy was created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time at which this backup copy was created.", + SerializedName = @"recoveryPointTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RecoveryPointTime { get; set; } + /// Type of the backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the backup copy.", + SerializedName = @"recoveryPointType", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointType { get; set; } + + } + /// Generic backup copy. + internal partial interface IGenericRecoveryPointInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal + { + /// Friendly name of the backup copy. + string FriendlyName { get; set; } + /// Additional information associated with this backup copy. + string RecoveryPointAdditionalInfo { get; set; } + /// Properties of Recovery Point + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get; set; } + /// Expiry time of Recovery Point in UTC. + string RecoveryPointPropertyExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + bool? RecoveryPointPropertyIsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + string RecoveryPointPropertyRuleName { get; set; } + /// Time at which this backup copy was created. + global::System.DateTime? RecoveryPointTime { get; set; } + /// Type of the backup copy. + string RecoveryPointType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericRecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericRecoveryPoint.json.cs new file mode 100644 index 000000000000..48dcfa39d55e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GenericRecoveryPoint.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Generic backup copy. + public partial class GenericRecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericRecoveryPoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGenericRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new GenericRecoveryPoint(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal GenericRecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __recoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint(json); + {_recoveryPointProperty = If( json?.PropertyT("recoveryPointProperties"), out var __jsonRecoveryPointProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties.FromJson(__jsonRecoveryPointProperties) : RecoveryPointProperty;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_recoveryPointType = If( json?.PropertyT("recoveryPointType"), out var __jsonRecoveryPointType) ? (string)__jsonRecoveryPointType : (string)RecoveryPointType;} + {_recoveryPointTime = If( json?.PropertyT("recoveryPointTime"), out var __jsonRecoveryPointTime) ? global::System.DateTime.TryParse((string)__jsonRecoveryPointTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRecoveryPointTimeValue) ? __jsonRecoveryPointTimeValue : RecoveryPointTime : RecoveryPointTime;} + {_recoveryPointAdditionalInfo = If( json?.PropertyT("recoveryPointAdditionalInfo"), out var __jsonRecoveryPointAdditionalInfo) ? (string)__jsonRecoveryPointAdditionalInfo : (string)RecoveryPointAdditionalInfo;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __recoveryPoint?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointProperty ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointProperty.ToJson(null,serializationMode) : null, "recoveryPointProperties" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._recoveryPointType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointType.ToString()) : null, "recoveryPointType" ,container.Add ); + AddIf( null != this._recoveryPointTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "recoveryPointTime" ,container.Add ); + AddIf( null != (((object)this._recoveryPointAdditionalInfo)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointAdditionalInfo.ToString()) : null, "recoveryPointAdditionalInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GetProtectedItemQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GetProtectedItemQueryObject.cs new file mode 100644 index 000000000000..b56588bdd1c1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GetProtectedItemQueryObject.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list backup items. + public partial class GetProtectedItemQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGetProtectedItemQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGetProtectedItemQueryObjectInternal + { + + /// Backing field for property. + private string _expand; + + /// Specifies if the additional information should be provided for this item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Expand { get => this._expand; set => this._expand = value; } + + /// Creates an new instance. + public GetProtectedItemQueryObject() + { + + } + } + /// Filters to list backup items. + public partial interface IGetProtectedItemQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Specifies if the additional information should be provided for this item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the additional information should be provided for this item.", + SerializedName = @"expand", + PossibleTypes = new [] { typeof(string) })] + string Expand { get; set; } + + } + /// Filters to list backup items. + internal partial interface IGetProtectedItemQueryObjectInternal + + { + /// Specifies if the additional information should be provided for this item. + string Expand { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GetProtectedItemQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GetProtectedItemQueryObject.json.cs new file mode 100644 index 000000000000..ce4178f58335 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/GetProtectedItemQueryObject.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list backup items. + public partial class GetProtectedItemQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGetProtectedItemQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGetProtectedItemQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IGetProtectedItemQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new GetProtectedItemQueryObject(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal GetProtectedItemQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_expand = If( json?.PropertyT("expand"), out var __jsonExpand) ? (string)__jsonExpand : (string)Expand;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._expand)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._expand.ToString()) : null, "expand" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/HourlySchedule.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/HourlySchedule.cs new file mode 100644 index 000000000000..949ee19e2a52 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/HourlySchedule.cs @@ -0,0 +1,92 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class HourlySchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal + { + + /// Backing field for property. + private int? _interval; + + /// + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Interval { get => this._interval; set => this._interval = value; } + + /// Backing field for property. + private int? _scheduleWindowDuration; + + /// To specify duration of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ScheduleWindowDuration { get => this._scheduleWindowDuration; set => this._scheduleWindowDuration = value; } + + /// Backing field for property. + private global::System.DateTime? _scheduleWindowStartTime; + + /// To specify start time of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? ScheduleWindowStartTime { get => this._scheduleWindowStartTime; set => this._scheduleWindowStartTime = value; } + + /// Creates an new instance. + public HourlySchedule() + { + + } + } + public partial interface IHourlySchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Interval at which backup needs to be triggered. For hourly the value + can be 4/6/8/12", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// To specify duration of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To specify duration of the backup window", + SerializedName = @"scheduleWindowDuration", + PossibleTypes = new [] { typeof(int) })] + int? ScheduleWindowDuration { get; set; } + /// To specify start time of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To specify start time of the backup window", + SerializedName = @"scheduleWindowStartTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ScheduleWindowStartTime { get; set; } + + } + internal partial interface IHourlyScheduleInternal + + { + /// + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + int? Interval { get; set; } + /// To specify duration of the backup window + int? ScheduleWindowDuration { get; set; } + /// To specify start time of the backup window + global::System.DateTime? ScheduleWindowStartTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/HourlySchedule.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/HourlySchedule.json.cs new file mode 100644 index 000000000000..b9f678ed2906 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/HourlySchedule.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class HourlySchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new HourlySchedule(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal HourlySchedule(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_interval = If( json?.PropertyT("interval"), out var __jsonInterval) ? (int?)__jsonInterval : Interval;} + {_scheduleWindowStartTime = If( json?.PropertyT("scheduleWindowStartTime"), out var __jsonScheduleWindowStartTime) ? global::System.DateTime.TryParse((string)__jsonScheduleWindowStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonScheduleWindowStartTimeValue) ? __jsonScheduleWindowStartTimeValue : ScheduleWindowStartTime : ScheduleWindowStartTime;} + {_scheduleWindowDuration = If( json?.PropertyT("scheduleWindowDuration"), out var __jsonScheduleWindowDuration) ? (int?)__jsonScheduleWindowDuration : ScheduleWindowDuration;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._interval ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._interval) : null, "interval" ,container.Add ); + AddIf( null != this._scheduleWindowStartTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._scheduleWindowStartTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "scheduleWindowStartTime" ,container.Add ); + AddIf( null != this._scheduleWindowDuration ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._scheduleWindowDuration) : null, "scheduleWindowDuration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmContainer.cs new file mode 100644 index 000000000000..9889dd3b7b5e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmContainer.cs @@ -0,0 +1,145 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific container. + public partial class IaaSvmContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType = value ; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus = value ?? null; } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus = value ?? null; } + + /// Backing field for property. + private string _resourceGroup; + + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceGroup { get => this._resourceGroup; set => this._resourceGroup = value; } + + /// Backing field for property. + private string _virtualMachineId; + + /// + /// Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualMachineId { get => this._virtualMachineId; set => this._virtualMachineId = value; } + + /// Backing field for property. + private string _virtualMachineVersion; + + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualMachineVersion { get => this._virtualMachineVersion; set => this._virtualMachineVersion = value; } + + /// Creates an new instance. + public IaaSvmContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionContainer), __protectionContainer); + await eventListener.AssertObjectIsValid(nameof(__protectionContainer), __protectionContainer); + } + } + /// IaaS VM workload-specific container. + public partial interface IIaaSvmContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer + { + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource group name of Recovery Services Vault.", + SerializedName = @"resourceGroup", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroup { get; set; } + /// + /// Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container.", + SerializedName = @"virtualMachineId", + PossibleTypes = new [] { typeof(string) })] + string VirtualMachineId { get; set; } + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the container represents a Classic or an Azure Resource Manager VM.", + SerializedName = @"virtualMachineVersion", + PossibleTypes = new [] { typeof(string) })] + string VirtualMachineVersion { get; set; } + + } + /// IaaS VM workload-specific container. + internal partial interface IIaaSvmContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal + { + /// Resource group name of Recovery Services Vault. + string ResourceGroup { get; set; } + /// + /// Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + /// + string VirtualMachineId { get; set; } + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + string VirtualMachineVersion { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmContainer.json.cs new file mode 100644 index 000000000000..d99377e2d634 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmContainer.json.cs @@ -0,0 +1,133 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific container. + public partial class IaaSvmContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainer. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainer interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("containerType") ) + { + case "Microsoft.ClassicCompute/virtualMachines": + { + return new AzureIaaSClassicComputeVmcontainer(json); + } + case "Microsoft.Compute/virtualMachines": + { + return new AzureIaaSComputeVmcontainer(json); + } + } + return new IaaSvmContainer(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IaaSvmContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(json); + {_virtualMachineId = If( json?.PropertyT("virtualMachineId"), out var __jsonVirtualMachineId) ? (string)__jsonVirtualMachineId : (string)VirtualMachineId;} + {_virtualMachineVersion = If( json?.PropertyT("virtualMachineVersion"), out var __jsonVirtualMachineVersion) ? (string)__jsonVirtualMachineVersion : (string)VirtualMachineVersion;} + {_resourceGroup = If( json?.PropertyT("resourceGroup"), out var __jsonResourceGroup) ? (string)__jsonResourceGroup : (string)ResourceGroup;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionContainer?.ToJson(container, serializationMode); + AddIf( null != (((object)this._virtualMachineId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualMachineId.ToString()) : null, "virtualMachineId" ,container.Add ); + AddIf( null != (((object)this._virtualMachineVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualMachineVersion.ToString()) : null, "virtualMachineVersion" ,container.Add ); + AddIf( null != (((object)this._resourceGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceGroup.ToString()) : null, "resourceGroup" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmProtectableItem.cs new file mode 100644 index 000000000000..c912bfd367ce --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmProtectableItem.cs @@ -0,0 +1,130 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item. + public partial class IaaSvmProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem __workloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItem(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).BackupManagementType = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).FriendlyName = value ?? null; } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectableItemType = value ; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Backing field for property. + private string _resourceGroup; + + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceGroup { get => this._resourceGroup; set => this._resourceGroup = value; } + + /// Backing field for property. + private string _virtualMachineId; + + /// Fully qualified ARM ID of the virtual machine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualMachineId { get => this._virtualMachineId; set => this._virtualMachineId = value; } + + /// Backing field for property. + private string _virtualMachineVersion; + + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualMachineVersion { get => this._virtualMachineVersion; set => this._virtualMachineVersion = value; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)__workloadProtectableItem).WorkloadType = value ?? null; } + + /// Creates an new instance. + public IaaSvmProtectableItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__workloadProtectableItem), __workloadProtectableItem); + await eventListener.AssertObjectIsValid(nameof(__workloadProtectableItem), __workloadProtectableItem); + } + } + /// IaaS VM workload-specific backup item. + public partial interface IIaaSvmProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem + { + /// Resource group name of Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource group name of Recovery Services Vault.", + SerializedName = @"resourceGroup", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroup { get; set; } + /// Fully qualified ARM ID of the virtual machine. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM ID of the virtual machine.", + SerializedName = @"virtualMachineId", + PossibleTypes = new [] { typeof(string) })] + string VirtualMachineId { get; set; } + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the container represents a Classic or an Azure Resource Manager VM.", + SerializedName = @"virtualMachineVersion", + PossibleTypes = new [] { typeof(string) })] + string VirtualMachineVersion { get; set; } + + } + /// IaaS VM workload-specific backup item. + internal partial interface IIaaSvmProtectableItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal + { + /// Resource group name of Recovery Services Vault. + string ResourceGroup { get; set; } + /// Fully qualified ARM ID of the virtual machine. + string VirtualMachineId { get; set; } + /// + /// Specifies whether the container represents a Classic or an Azure Resource Manager VM. + /// + string VirtualMachineVersion { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmProtectableItem.json.cs new file mode 100644 index 000000000000..b496d2923626 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaaSvmProtectableItem.json.cs @@ -0,0 +1,133 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup item. + public partial class IaaSvmProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItem. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItem interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaaSvmProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("protectableItemType") ) + { + case "Microsoft.ClassicCompute/virtualMachines": + { + return new AzureIaaSClassicComputeVmprotectableItem(json); + } + case "Microsoft.Compute/virtualMachines": + { + return new AzureIaaSComputeVmprotectableItem(json); + } + } + return new IaaSvmProtectableItem(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IaaSvmProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __workloadProtectableItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItem(json); + {_virtualMachineId = If( json?.PropertyT("virtualMachineId"), out var __jsonVirtualMachineId) ? (string)__jsonVirtualMachineId : (string)VirtualMachineId;} + {_virtualMachineVersion = If( json?.PropertyT("virtualMachineVersion"), out var __jsonVirtualMachineVersion) ? (string)__jsonVirtualMachineVersion : (string)VirtualMachineVersion;} + {_resourceGroup = If( json?.PropertyT("resourceGroup"), out var __jsonResourceGroup) ? (string)__jsonResourceGroup : (string)ResourceGroup;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __workloadProtectableItem?.ToJson(container, serializationMode); + AddIf( null != (((object)this._virtualMachineId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualMachineId.ToString()) : null, "virtualMachineId" ,container.Add ); + AddIf( null != (((object)this._virtualMachineVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualMachineVersion.ToString()) : null, "virtualMachineVersion" ,container.Add ); + AddIf( null != (((object)this._resourceGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceGroup.ToString()) : null, "resourceGroup" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMBackupRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMBackupRequest.cs new file mode 100644 index 000000000000..0f124a2ecd67 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMBackupRequest.cs @@ -0,0 +1,76 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup request. + public partial class IaasVMBackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMBackupRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMBackupRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest __backupRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupRequest(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal)__backupRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal)__backupRequest).ObjectType = value ; } + + /// Backing field for property. + private global::System.DateTime? _recoveryPointExpiryTimeInUtc; + + /// Backup copy will expire after the time specified (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? RecoveryPointExpiryTimeInUtc { get => this._recoveryPointExpiryTimeInUtc; set => this._recoveryPointExpiryTimeInUtc = value; } + + /// Creates an new instance. + public IaasVMBackupRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__backupRequest), __backupRequest); + await eventListener.AssertObjectIsValid(nameof(__backupRequest), __backupRequest); + } + } + /// IaaS VM workload-specific backup request. + public partial interface IIaasVMBackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequest + { + /// Backup copy will expire after the time specified (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup copy will expire after the time specified (UTC).", + SerializedName = @"recoveryPointExpiryTimeInUTC", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RecoveryPointExpiryTimeInUtc { get; set; } + + } + /// IaaS VM workload-specific backup request. + internal partial interface IIaasVMBackupRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestInternal + { + /// Backup copy will expire after the time specified (UTC). + global::System.DateTime? RecoveryPointExpiryTimeInUtc { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMBackupRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMBackupRequest.json.cs new file mode 100644 index 000000000000..8177993fe470 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMBackupRequest.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific backup request. + public partial class IaasVMBackupRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMBackupRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMBackupRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMBackupRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new IaasVMBackupRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IaasVMBackupRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __backupRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupRequest(json); + {_recoveryPointExpiryTimeInUtc = If( json?.PropertyT("recoveryPointExpiryTimeInUTC"), out var __jsonRecoveryPointExpiryTimeInUtc) ? global::System.DateTime.TryParse((string)__jsonRecoveryPointExpiryTimeInUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRecoveryPointExpiryTimeInUtcValue) ? __jsonRecoveryPointExpiryTimeInUtcValue : RecoveryPointExpiryTimeInUtc : RecoveryPointExpiryTimeInUtc;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __backupRequest?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointExpiryTimeInUtc ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointExpiryTimeInUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "recoveryPointExpiryTimeInUTC" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPoint.cs new file mode 100644 index 000000000000..f98f2e2af6c4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPoint.cs @@ -0,0 +1,618 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload specific backup copy. + public partial class IaasVMRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint __recoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint(); + + /// BEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BekDetailSecretData { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).BekDetailSecretData; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).BekDetailSecretData = value ?? null; } + + /// Secret is BEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BekDetailSecretUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).BekDetailSecretUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).BekDetailSecretUrl = value ?? null; } + + /// ID of the Key Vault where this Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BekDetailSecretVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).BekDetailSecretVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).BekDetailSecretVaultId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation _extendedLocation; + + /// + /// Extended location of the VM recovery point, + /// should be null if VM is in public cloud + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation ExtendedLocation { get => (this._extendedLocation = this._extendedLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ExtendedLocation()); set => this._extendedLocation = value; } + + /// Name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedLocationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocationInternal)ExtendedLocation).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocationInternal)ExtendedLocation).Name = value ?? null; } + + /// Type of the extended location. Possible values include: 'EdgeZone' + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedLocationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocationInternal)ExtendedLocation).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocationInternal)ExtendedLocation).Type = value ?? null; } + + /// Backing field for property. + private bool? _isInstantIlrSessionActive; + + /// Is the session to recover items from this backup copy still active. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsInstantIlrSessionActive { get => this._isInstantIlrSessionActive; set => this._isInstantIlrSessionActive = value; } + + /// Backing field for property. + private bool? _isManagedVirtualMachine; + + /// Whether VM is with Managed Disks + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsManagedVirtualMachine { get => this._isManagedVirtualMachine; set => this._isManagedVirtualMachine = value; } + + /// Backing field for property. + private bool? _isPrivateAccessEnabledOnAnyDisk; + + /// + /// This flag denotes if any of the disks in the VM are using Private access network setting + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsPrivateAccessEnabledOnAnyDisk { get => this._isPrivateAccessEnabledOnAnyDisk; set => this._isPrivateAccessEnabledOnAnyDisk = value; } + + /// Backing field for property. + private bool? _isSourceVMEncrypted; + + /// Identifies whether the VM was encrypted when the backup copy is created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsSourceVMEncrypted { get => this._isSourceVMEncrypted; set => this._isSourceVMEncrypted = value; } + + /// KEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string KekDetailKeyBackupData { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).KekDetailKeyBackupData; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).KekDetailKeyBackupData = value ?? null; } + + /// Key is KEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string KekDetailKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).KekDetailKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).KekDetailKeyUrl = value ?? null; } + + /// Key Vault ID where this Key is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string KekDetailKeyVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).KekDetailKeyVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).KekDetailKeyVaultId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetails _keyAndSecret; + + /// + /// Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetails KeyAndSecret { get => (this._keyAndSecret = this._keyAndSecret ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.KeyAndSecretDetails()); set => this._keyAndSecret = value; } + + /// Encryption mechanism: None/ SinglePass/ DoublePass + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string KeyAndSecretEncryptionMechanism { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).EncryptionMechanism; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).EncryptionMechanism = value ?? null; } + + /// Internal Acessors for ExtendedLocation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointInternal.ExtendedLocation { get => (this._extendedLocation = this._extendedLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ExtendedLocation()); set { {_extendedLocation = value;} } } + + /// Internal Acessors for KeyAndSecret + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointInternal.KeyAndSecret { get => (this._keyAndSecret = this._keyAndSecret ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.KeyAndSecretDetails()); set { {_keyAndSecret = value;} } } + + /// Internal Acessors for KeyAndSecretBekDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointInternal.KeyAndSecretBekDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).BekDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).BekDetail = value; } + + /// Internal Acessors for KeyAndSecretKekDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointInternal.KeyAndSecretKekDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).KekDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal)KeyAndSecret).KekDetail = value; } + + /// Internal Acessors for RecoveryPointDiskConfiguration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfiguration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointInternal.RecoveryPointDiskConfiguration { get => (this._recoveryPointDiskConfiguration = this._recoveryPointDiskConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointDiskConfiguration()); set { {_recoveryPointDiskConfiguration = value;} } } + + /// Internal Acessors for RecoveryPointProperty + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointInternal.RecoveryPointProperty { get => (this._recoveryPointProperty = this._recoveryPointProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties()); set { {_recoveryPointProperty = value;} } } + + /// Backing field for property. + private string _oSType; + + /// OS type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string OSType { get => this._oSType; set => this._oSType = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__recoveryPoint).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)__recoveryPoint).ObjectType = value ; } + + /// Backing field for property. + private bool? _originalStorageAccountOption; + + /// Original Storage Account Option + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? OriginalStorageAccountOption { get => this._originalStorageAccountOption; set => this._originalStorageAccountOption = value; } + + /// Backing field for property. + private string _recoveryPointAdditionalInfo; + + /// Additional information associated with this backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointAdditionalInfo { get => this._recoveryPointAdditionalInfo; set => this._recoveryPointAdditionalInfo = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfiguration _recoveryPointDiskConfiguration; + + /// Disk configuration + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfiguration RecoveryPointDiskConfiguration { get => (this._recoveryPointDiskConfiguration = this._recoveryPointDiskConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointDiskConfiguration()); set => this._recoveryPointDiskConfiguration = value; } + + /// Information of disks excluded from backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] RecoveryPointDiskConfigurationExcludedDiskList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfigurationInternal)RecoveryPointDiskConfiguration).ExcludedDiskList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfigurationInternal)RecoveryPointDiskConfiguration).ExcludedDiskList = value ?? null /* arrayOf */; } + + /// Information of disks included in backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] RecoveryPointDiskConfigurationIncludedDiskList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfigurationInternal)RecoveryPointDiskConfiguration).IncludedDiskList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfigurationInternal)RecoveryPointDiskConfiguration).IncludedDiskList = value ?? null /* arrayOf */; } + + /// Number of disks attached to the VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? RecoveryPointDiskConfigurationNumberOfDisksAttachedToVM { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfigurationInternal)RecoveryPointDiskConfiguration).NumberOfDisksAttachedToVM; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfigurationInternal)RecoveryPointDiskConfiguration).NumberOfDisksAttachedToVM = value ?? default(int); } + + /// Number of disks included in backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? RecoveryPointDiskConfigurationNumberOfDisksIncludedInBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfigurationInternal)RecoveryPointDiskConfiguration).NumberOfDisksIncludedInBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfigurationInternal)RecoveryPointDiskConfiguration).NumberOfDisksIncludedInBackup = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfo _recoveryPointMoveReadinessInfo; + + /// Eligibility of RP to be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get => (this._recoveryPointMoveReadinessInfo = this._recoveryPointMoveReadinessInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaasVMRecoveryPointMoveReadinessInfo()); set => this._recoveryPointMoveReadinessInfo = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties _recoveryPointProperty; + + /// Properties of Recovery Point + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get => (this._recoveryPointProperty = this._recoveryPointProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties()); set => this._recoveryPointProperty = value; } + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointPropertyExpiryTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).ExpiryTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).ExpiryTime = value ?? null; } + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? RecoveryPointPropertyIsSoftDeleted { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).IsSoftDeleted; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).IsSoftDeleted = value ?? default(bool); } + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointPropertyRuleName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).RuleName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal)RecoveryPointProperty).RuleName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] _recoveryPointTierDetail; + + /// Recovery point tier information. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get => this._recoveryPointTierDetail; set => this._recoveryPointTierDetail = value; } + + /// Backing field for property. + private global::System.DateTime? _recoveryPointTime; + + /// Time at which this backup copy was created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? RecoveryPointTime { get => this._recoveryPointTime; set => this._recoveryPointTime = value; } + + /// Backing field for property. + private string _recoveryPointType; + + /// Type of the backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointType { get => this._recoveryPointType; set => this._recoveryPointType = value; } + + /// Backing field for property. + private string _securityType; + + /// Security Type of the Disk + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SecurityType { get => this._securityType; set => this._securityType = value; } + + /// Backing field for property. + private string _sourceVMStorageType; + + /// Storage type of the VM whose backup copy is created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceVMStorageType { get => this._sourceVMStorageType; set => this._sourceVMStorageType = value; } + + /// Backing field for property. + private string _virtualMachineSize; + + /// Virtual Machine Size + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualMachineSize { get => this._virtualMachineSize; set => this._virtualMachineSize = value; } + + /// Backing field for property. + private string[] _zone; + + /// + /// Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Zone { get => this._zone; set => this._zone = value; } + + /// Creates an new instance. + public IaasVMRecoveryPoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__recoveryPoint), __recoveryPoint); + await eventListener.AssertObjectIsValid(nameof(__recoveryPoint), __recoveryPoint); + } + } + /// IaaS VM workload specific backup copy. + public partial interface IIaasVMRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint + { + /// BEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"BEK data.", + SerializedName = @"secretData", + PossibleTypes = new [] { typeof(string) })] + string BekDetailSecretData { get; set; } + /// Secret is BEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Secret is BEK.", + SerializedName = @"secretUrl", + PossibleTypes = new [] { typeof(string) })] + string BekDetailSecretUrl { get; set; } + /// ID of the Key Vault where this Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the Key Vault where this Secret is stored.", + SerializedName = @"secretVaultId", + PossibleTypes = new [] { typeof(string) })] + string BekDetailSecretVaultId { get; set; } + /// Name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the extended location.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string ExtendedLocationName { get; set; } + /// Type of the extended location. Possible values include: 'EdgeZone' + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the extended location. Possible values include: 'EdgeZone'", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string ExtendedLocationType { get; set; } + /// Is the session to recover items from this backup copy still active. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Is the session to recover items from this backup copy still active.", + SerializedName = @"isInstantIlrSessionActive", + PossibleTypes = new [] { typeof(bool) })] + bool? IsInstantIlrSessionActive { get; set; } + /// Whether VM is with Managed Disks + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether VM is with Managed Disks", + SerializedName = @"isManagedVirtualMachine", + PossibleTypes = new [] { typeof(bool) })] + bool? IsManagedVirtualMachine { get; set; } + /// + /// This flag denotes if any of the disks in the VM are using Private access network setting + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This flag denotes if any of the disks in the VM are using Private access network setting", + SerializedName = @"isPrivateAccessEnabledOnAnyDisk", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPrivateAccessEnabledOnAnyDisk { get; set; } + /// Identifies whether the VM was encrypted when the backup copy is created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifies whether the VM was encrypted when the backup copy is created.", + SerializedName = @"isSourceVMEncrypted", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSourceVMEncrypted { get; set; } + /// KEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"KEK data.", + SerializedName = @"keyBackupData", + PossibleTypes = new [] { typeof(string) })] + string KekDetailKeyBackupData { get; set; } + /// Key is KEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key is KEK.", + SerializedName = @"keyUrl", + PossibleTypes = new [] { typeof(string) })] + string KekDetailKeyUrl { get; set; } + /// Key Vault ID where this Key is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Vault ID where this Key is stored.", + SerializedName = @"keyVaultId", + PossibleTypes = new [] { typeof(string) })] + string KekDetailKeyVaultId { get; set; } + /// Encryption mechanism: None/ SinglePass/ DoublePass + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Encryption mechanism: None/ SinglePass/ DoublePass", + SerializedName = @"encryptionMechanism", + PossibleTypes = new [] { typeof(string) })] + string KeyAndSecretEncryptionMechanism { get; set; } + /// OS type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"OS type", + SerializedName = @"osType", + PossibleTypes = new [] { typeof(string) })] + string OSType { get; set; } + /// Original Storage Account Option + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Original Storage Account Option", + SerializedName = @"originalStorageAccountOption", + PossibleTypes = new [] { typeof(bool) })] + bool? OriginalStorageAccountOption { get; set; } + /// Additional information associated with this backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information associated with this backup copy.", + SerializedName = @"recoveryPointAdditionalInfo", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointAdditionalInfo { get; set; } + /// Information of disks excluded from backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Information of disks excluded from backup", + SerializedName = @"excludedDiskList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] RecoveryPointDiskConfigurationExcludedDiskList { get; set; } + /// Information of disks included in backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Information of disks included in backup", + SerializedName = @"includedDiskList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] RecoveryPointDiskConfigurationIncludedDiskList { get; set; } + /// Number of disks attached to the VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of disks attached to the VM", + SerializedName = @"numberOfDisksAttachedToVm", + PossibleTypes = new [] { typeof(int) })] + int? RecoveryPointDiskConfigurationNumberOfDisksAttachedToVM { get; set; } + /// Number of disks included in backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of disks included in backup", + SerializedName = @"numberOfDisksIncludedInBackup", + PossibleTypes = new [] { typeof(int) })] + int? RecoveryPointDiskConfigurationNumberOfDisksIncludedInBackup { get; set; } + /// Eligibility of RP to be moved to another tier + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Eligibility of RP to be moved to another tier", + SerializedName = @"recoveryPointMoveReadinessInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get; set; } + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Expiry time of Recovery Point in UTC.", + SerializedName = @"expiryTime", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointPropertyExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Bool to indicate whether RP is in soft delete state or not", + SerializedName = @"isSoftDeleted", + PossibleTypes = new [] { typeof(bool) })] + bool? RecoveryPointPropertyIsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rule name tagged on Recovery Point that governs life cycle", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointPropertyRuleName { get; set; } + /// Recovery point tier information. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Recovery point tier information.", + SerializedName = @"recoveryPointTierDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get; set; } + /// Time at which this backup copy was created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time at which this backup copy was created.", + SerializedName = @"recoveryPointTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RecoveryPointTime { get; set; } + /// Type of the backup copy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the backup copy.", + SerializedName = @"recoveryPointType", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointType { get; set; } + /// Security Type of the Disk + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Security Type of the Disk", + SerializedName = @"securityType", + PossibleTypes = new [] { typeof(string) })] + string SecurityType { get; set; } + /// Storage type of the VM whose backup copy is created. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Storage type of the VM whose backup copy is created.", + SerializedName = @"sourceVMStorageType", + PossibleTypes = new [] { typeof(string) })] + string SourceVMStorageType { get; set; } + /// Virtual Machine Size + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Virtual Machine Size", + SerializedName = @"virtualMachineSize", + PossibleTypes = new [] { typeof(string) })] + string VirtualMachineSize { get; set; } + /// + /// Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + string[] Zone { get; set; } + + } + /// IaaS VM workload specific backup copy. + internal partial interface IIaasVMRecoveryPointInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal + { + /// BEK data. + string BekDetailSecretData { get; set; } + /// Secret is BEK. + string BekDetailSecretUrl { get; set; } + /// ID of the Key Vault where this Secret is stored. + string BekDetailSecretVaultId { get; set; } + /// + /// Extended location of the VM recovery point, + /// should be null if VM is in public cloud + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation ExtendedLocation { get; set; } + /// Name of the extended location. + string ExtendedLocationName { get; set; } + /// Type of the extended location. Possible values include: 'EdgeZone' + string ExtendedLocationType { get; set; } + /// Is the session to recover items from this backup copy still active. + bool? IsInstantIlrSessionActive { get; set; } + /// Whether VM is with Managed Disks + bool? IsManagedVirtualMachine { get; set; } + /// + /// This flag denotes if any of the disks in the VM are using Private access network setting + /// + bool? IsPrivateAccessEnabledOnAnyDisk { get; set; } + /// Identifies whether the VM was encrypted when the backup copy is created. + bool? IsSourceVMEncrypted { get; set; } + /// KEK data. + string KekDetailKeyBackupData { get; set; } + /// Key is KEK. + string KekDetailKeyUrl { get; set; } + /// Key Vault ID where this Key is stored. + string KekDetailKeyVaultId { get; set; } + /// + /// Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetails KeyAndSecret { get; set; } + /// BEK is bitlocker encryption key. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails KeyAndSecretBekDetail { get; set; } + /// Encryption mechanism: None/ SinglePass/ DoublePass + string KeyAndSecretEncryptionMechanism { get; set; } + /// KEK is encryption key for BEK. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails KeyAndSecretKekDetail { get; set; } + /// OS type + string OSType { get; set; } + /// Original Storage Account Option + bool? OriginalStorageAccountOption { get; set; } + /// Additional information associated with this backup copy. + string RecoveryPointAdditionalInfo { get; set; } + /// Disk configuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfiguration RecoveryPointDiskConfiguration { get; set; } + /// Information of disks excluded from backup + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] RecoveryPointDiskConfigurationExcludedDiskList { get; set; } + /// Information of disks included in backup + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] RecoveryPointDiskConfigurationIncludedDiskList { get; set; } + /// Number of disks attached to the VM + int? RecoveryPointDiskConfigurationNumberOfDisksAttachedToVM { get; set; } + /// Number of disks included in backup + int? RecoveryPointDiskConfigurationNumberOfDisksIncludedInBackup { get; set; } + /// Eligibility of RP to be moved to another tier + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfo RecoveryPointMoveReadinessInfo { get; set; } + /// Properties of Recovery Point + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties RecoveryPointProperty { get; set; } + /// Expiry time of Recovery Point in UTC. + string RecoveryPointPropertyExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + bool? RecoveryPointPropertyIsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + string RecoveryPointPropertyRuleName { get; set; } + /// Recovery point tier information. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2[] RecoveryPointTierDetail { get; set; } + /// Time at which this backup copy was created. + global::System.DateTime? RecoveryPointTime { get; set; } + /// Type of the backup copy. + string RecoveryPointType { get; set; } + /// Security Type of the Disk + string SecurityType { get; set; } + /// Storage type of the VM whose backup copy is created. + string SourceVMStorageType { get; set; } + /// Virtual Machine Size + string VirtualMachineSize { get; set; } + /// + /// Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms + /// + string[] Zone { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPoint.json.cs new file mode 100644 index 000000000000..a76158e8113c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPoint.json.cs @@ -0,0 +1,162 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload specific backup copy. + public partial class IaasVMRecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new IaasVMRecoveryPoint(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IaasVMRecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __recoveryPoint = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint(json); + {_keyAndSecret = If( json?.PropertyT("keyAndSecret"), out var __jsonKeyAndSecret) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.KeyAndSecretDetails.FromJson(__jsonKeyAndSecret) : KeyAndSecret;} + {_recoveryPointDiskConfiguration = If( json?.PropertyT("recoveryPointDiskConfiguration"), out var __jsonRecoveryPointDiskConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointDiskConfiguration.FromJson(__jsonRecoveryPointDiskConfiguration) : RecoveryPointDiskConfiguration;} + {_recoveryPointProperty = If( json?.PropertyT("recoveryPointProperties"), out var __jsonRecoveryPointProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointProperties.FromJson(__jsonRecoveryPointProperties) : RecoveryPointProperty;} + {_extendedLocation = If( json?.PropertyT("extendedLocation"), out var __jsonExtendedLocation) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ExtendedLocation.FromJson(__jsonExtendedLocation) : ExtendedLocation;} + {_recoveryPointType = If( json?.PropertyT("recoveryPointType"), out var __jsonRecoveryPointType) ? (string)__jsonRecoveryPointType : (string)RecoveryPointType;} + {_recoveryPointTime = If( json?.PropertyT("recoveryPointTime"), out var __jsonRecoveryPointTime) ? global::System.DateTime.TryParse((string)__jsonRecoveryPointTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonRecoveryPointTimeValue) ? __jsonRecoveryPointTimeValue : RecoveryPointTime : RecoveryPointTime;} + {_recoveryPointAdditionalInfo = If( json?.PropertyT("recoveryPointAdditionalInfo"), out var __jsonRecoveryPointAdditionalInfo) ? (string)__jsonRecoveryPointAdditionalInfo : (string)RecoveryPointAdditionalInfo;} + {_sourceVMStorageType = If( json?.PropertyT("sourceVMStorageType"), out var __jsonSourceVMStorageType) ? (string)__jsonSourceVMStorageType : (string)SourceVMStorageType;} + {_isSourceVMEncrypted = If( json?.PropertyT("isSourceVMEncrypted"), out var __jsonIsSourceVMEncrypted) ? (bool?)__jsonIsSourceVMEncrypted : IsSourceVMEncrypted;} + {_isInstantIlrSessionActive = If( json?.PropertyT("isInstantIlrSessionActive"), out var __jsonIsInstantIlrSessionActive) ? (bool?)__jsonIsInstantIlrSessionActive : IsInstantIlrSessionActive;} + {_recoveryPointTierDetail = If( json?.PropertyT("recoveryPointTierDetails"), out var __jsonRecoveryPointTierDetails) ? If( __jsonRecoveryPointTierDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointTierInformationV2.FromJson(__u) )) ))() : null : RecoveryPointTierDetail;} + {_isManagedVirtualMachine = If( json?.PropertyT("isManagedVirtualMachine"), out var __jsonIsManagedVirtualMachine) ? (bool?)__jsonIsManagedVirtualMachine : IsManagedVirtualMachine;} + {_virtualMachineSize = If( json?.PropertyT("virtualMachineSize"), out var __jsonVirtualMachineSize) ? (string)__jsonVirtualMachineSize : (string)VirtualMachineSize;} + {_originalStorageAccountOption = If( json?.PropertyT("originalStorageAccountOption"), out var __jsonOriginalStorageAccountOption) ? (bool?)__jsonOriginalStorageAccountOption : OriginalStorageAccountOption;} + {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : Zone;} + {_recoveryPointMoveReadinessInfo = If( json?.PropertyT("recoveryPointMoveReadinessInfo"), out var __jsonRecoveryPointMoveReadinessInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaasVMRecoveryPointMoveReadinessInfo.FromJson(__jsonRecoveryPointMoveReadinessInfo) : RecoveryPointMoveReadinessInfo;} + {_securityType = If( json?.PropertyT("securityType"), out var __jsonSecurityType) ? (string)__jsonSecurityType : (string)SecurityType;} + {_isPrivateAccessEnabledOnAnyDisk = If( json?.PropertyT("isPrivateAccessEnabledOnAnyDisk"), out var __jsonIsPrivateAccessEnabledOnAnyDisk) ? (bool?)__jsonIsPrivateAccessEnabledOnAnyDisk : IsPrivateAccessEnabledOnAnyDisk;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __recoveryPoint?.ToJson(container, serializationMode); + AddIf( null != this._keyAndSecret ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._keyAndSecret.ToJson(null,serializationMode) : null, "keyAndSecret" ,container.Add ); + AddIf( null != this._recoveryPointDiskConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointDiskConfiguration.ToJson(null,serializationMode) : null, "recoveryPointDiskConfiguration" ,container.Add ); + AddIf( null != this._recoveryPointProperty ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointProperty.ToJson(null,serializationMode) : null, "recoveryPointProperties" ,container.Add ); + AddIf( null != this._extendedLocation ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedLocation.ToJson(null,serializationMode) : null, "extendedLocation" ,container.Add ); + AddIf( null != (((object)this._recoveryPointType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointType.ToString()) : null, "recoveryPointType" ,container.Add ); + AddIf( null != this._recoveryPointTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "recoveryPointTime" ,container.Add ); + AddIf( null != (((object)this._recoveryPointAdditionalInfo)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointAdditionalInfo.ToString()) : null, "recoveryPointAdditionalInfo" ,container.Add ); + AddIf( null != (((object)this._sourceVMStorageType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceVMStorageType.ToString()) : null, "sourceVMStorageType" ,container.Add ); + AddIf( null != this._isSourceVMEncrypted ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isSourceVMEncrypted) : null, "isSourceVMEncrypted" ,container.Add ); + AddIf( null != this._isInstantIlrSessionActive ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isInstantIlrSessionActive) : null, "isInstantIlrSessionActive" ,container.Add ); + if (null != this._recoveryPointTierDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recoveryPointTierDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("recoveryPointTierDetails",__w); + } + AddIf( null != this._isManagedVirtualMachine ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isManagedVirtualMachine) : null, "isManagedVirtualMachine" ,container.Add ); + AddIf( null != (((object)this._virtualMachineSize)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualMachineSize.ToString()) : null, "virtualMachineSize" ,container.Add ); + AddIf( null != this._originalStorageAccountOption ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._originalStorageAccountOption) : null, "originalStorageAccountOption" ,container.Add ); + AddIf( null != (((object)this._oSType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oSType.ToString()) : null, "osType" ,container.Add ); + if (null != this._zone) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._zone ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("zones",__r); + } + AddIf( null != this._recoveryPointMoveReadinessInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointMoveReadinessInfo.ToJson(null,serializationMode) : null, "recoveryPointMoveReadinessInfo" ,container.Add ); + AddIf( null != (((object)this._securityType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._securityType.ToString()) : null, "securityType" ,container.Add ); + AddIf( null != this._isPrivateAccessEnabledOnAnyDisk ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isPrivateAccessEnabledOnAnyDisk) : null, "isPrivateAccessEnabledOnAnyDisk" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPointMoveReadinessInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPointMoveReadinessInfo.cs new file mode 100644 index 000000000000..4e4edb9b89d4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPointMoveReadinessInfo.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Eligibility of RP to be moved to another tier + public partial class IaasVMRecoveryPointMoveReadinessInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfoInternal + { + + /// Creates an new instance. + public IaasVMRecoveryPointMoveReadinessInfo() + { + + } + } + /// Eligibility of RP to be moved to another tier + public partial interface IIaasVMRecoveryPointMoveReadinessInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Eligibility of RP to be moved to another tier + internal partial interface IIaasVMRecoveryPointMoveReadinessInfoInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPointMoveReadinessInfo.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPointMoveReadinessInfo.dictionary.cs new file mode 100644 index 000000000000..7b65bd74b111 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPointMoveReadinessInfo.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class IaasVMRecoveryPointMoveReadinessInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaasVMRecoveryPointMoveReadinessInfo source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPointMoveReadinessInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPointMoveReadinessInfo.json.cs new file mode 100644 index 000000000000..02dd16bd5234 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRecoveryPointMoveReadinessInfo.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Eligibility of RP to be moved to another tier + public partial class IaasVMRecoveryPointMoveReadinessInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRecoveryPointMoveReadinessInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new IaasVMRecoveryPointMoveReadinessInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal IaasVMRecoveryPointMoveReadinessInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointMoveReadinessInfo.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreRequest.cs new file mode 100644 index 000000000000..6c56cdfbd7d2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreRequest.cs @@ -0,0 +1,730 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific restore. + public partial class IaasVMRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest __restoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest(); + + /// Backing field for property. + private string _affinityGroup; + + /// + /// Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AffinityGroup { get => this._affinityGroup; set => this._affinityGroup = value; } + + /// Backing field for property. + private bool? _createNewCloudService; + + /// + /// Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same + /// cloud service as it was at the time of backup. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? CreateNewCloudService { get => this._createNewCloudService; set => this._createNewCloudService = value; } + + /// Backing field for property. + private string _diskEncryptionSetId; + + /// + /// DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DiskEncryptionSetId { get => this._diskEncryptionSetId; set => this._diskEncryptionSetId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetails _encryptionDetail; + + /// Details needed if the VM was encrypted at the time of backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetails EncryptionDetail { get => (this._encryptionDetail = this._encryptionDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.EncryptionDetails()); set => this._encryptionDetail = value; } + + /// + /// Identifies whether this backup copy represents an encrypted VM at the time of backup. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? EncryptionDetailEncryptionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).EncryptionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).EncryptionEnabled = value ?? default(bool); } + + /// Key Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string EncryptionDetailKekUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).KekUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).KekUrl = value ?? null; } + + /// ID of Key Vault where KEK is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string EncryptionDetailKekVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).KekVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).KekVaultId = value ?? null; } + + /// Secret Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string EncryptionDetailSecretKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).SecretKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).SecretKeyUrl = value ?? null; } + + /// ID of Key Vault where Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string EncryptionDetailSecretKeyVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).SecretKeyVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetailsInternal)EncryptionDetail).SecretKeyVaultId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation _extendedLocation; + + /// + /// Target extended location where the VM should be restored, + /// should be null if restore is to be done in public cloud + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation ExtendedLocation { get => (this._extendedLocation = this._extendedLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ExtendedLocation()); set => this._extendedLocation = value; } + + /// Name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedLocationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocationInternal)ExtendedLocation).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocationInternal)ExtendedLocation).Name = value ?? null; } + + /// Type of the extended location. Possible values include: 'EdgeZone' + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedLocationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocationInternal)ExtendedLocation).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocationInternal)ExtendedLocation).Type = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetails _identityBasedRestoreDetail; + + /// IaaS VM workload specific restore details for restores using managed identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetails IdentityBasedRestoreDetail { get => (this._identityBasedRestoreDetail = this._identityBasedRestoreDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IdentityBasedRestoreDetails()); set => this._identityBasedRestoreDetail = value; } + + /// Gets the class type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string IdentityBasedRestoreDetailObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetailsInternal)IdentityBasedRestoreDetail).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetailsInternal)IdentityBasedRestoreDetail).ObjectType = value ?? null; } + + /// Fully qualified ARM ID of the target storage account. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string IdentityBasedRestoreDetailTargetStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetailsInternal)IdentityBasedRestoreDetail).TargetStorageAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetailsInternal)IdentityBasedRestoreDetail).TargetStorageAccountId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfo _identityInfo; + + /// Managed Identity information required to access customer storage account. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfo IdentityInfo { get => (this._identityInfo = this._identityInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IdentityInfo()); set => this._identityInfo = value; } + + /// To differentiate if the managed identity is system assigned or user assigned + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? IdentityInfoIsSystemAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfoInternal)IdentityInfo).IsSystemAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfoInternal)IdentityInfo).IsSystemAssignedIdentity = value ?? default(bool); } + + /// + /// Managed Identity Resource Id + /// Optional: Might not be required in the case of system assigned managed identity + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string IdentityInfoManagedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfoInternal)IdentityInfo).ManagedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfoInternal)IdentityInfo).ManagedIdentityResourceId = value ?? null; } + + /// Internal Acessors for EncryptionDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal.EncryptionDetail { get => (this._encryptionDetail = this._encryptionDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.EncryptionDetails()); set { {_encryptionDetail = value;} } } + + /// Internal Acessors for ExtendedLocation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal.ExtendedLocation { get => (this._extendedLocation = this._extendedLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ExtendedLocation()); set { {_extendedLocation = value;} } } + + /// Internal Acessors for IdentityBasedRestoreDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal.IdentityBasedRestoreDetail { get => (this._identityBasedRestoreDetail = this._identityBasedRestoreDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IdentityBasedRestoreDetails()); set { {_identityBasedRestoreDetail = value;} } } + + /// Internal Acessors for IdentityInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal.IdentityInfo { get => (this._identityInfo = this._identityInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IdentityInfo()); set { {_identityInfo = value;} } } + + /// Internal Acessors for SecuredVMDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal.SecuredVMDetail { get => (this._securedVMDetail = this._securedVMDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SecuredVMDetails()); set { {_securedVMDetail = value;} } } + + /// Internal Acessors for TargetDiskNetworkAccessSetting + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettings Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal.TargetDiskNetworkAccessSetting { get => (this._targetDiskNetworkAccessSetting = this._targetDiskNetworkAccessSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TargetDiskNetworkAccessSettings()); set { {_targetDiskNetworkAccessSetting = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ObjectType = value ; } + + /// Backing field for property. + private bool? _originalStorageAccountOption; + + /// Original Storage Account Option + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? OriginalStorageAccountOption { get => this._originalStorageAccountOption; set => this._originalStorageAccountOption = value; } + + /// Backing field for property. + private string _recoveryPointId; + + /// ID of the backup copy to be recovered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointId { get => this._recoveryPointId; set => this._recoveryPointId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? _recoveryType; + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => this._recoveryType; set => this._recoveryType = value; } + + /// Backing field for property. + private string _region; + + /// Region in which the virtual machine is restored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Region { get => this._region; set => this._region = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__restoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private int[] _restoreDiskLunList; + + /// List of Disk LUNs for partial restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int[] RestoreDiskLunList { get => this._restoreDiskLunList; set => this._restoreDiskLunList = value; } + + /// Backing field for property. + private bool? _restoreWithManagedDisk; + + /// Flag to denote of an Unmanaged disk VM should be restored with Managed disks. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? RestoreWithManagedDisk { get => this._restoreWithManagedDisk; set => this._restoreWithManagedDisk = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetails _securedVMDetail; + + /// Stores Secured VM Details + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetails SecuredVMDetail { get => (this._securedVMDetail = this._securedVMDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SecuredVMDetails()); set => this._securedVMDetail = value; } + + /// Gets or Sets Disk Encryption Set Id for Secured VM OS Disk + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SecuredVMDetailSecuredVmosdiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetailsInternal)SecuredVMDetail).SecuredVmosDiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetailsInternal)SecuredVMDetail).SecuredVmosDiskEncryptionSetId = value ?? null; } + + /// Backing field for property. + private string _sourceResourceId; + + /// Fully qualified ARM ID of the VM which is being recovered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Backing field for property. + private string _storageAccountId; + + /// + /// Fully qualified ARM ID of the storage account to which the VM has to be restored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string StorageAccountId { get => this._storageAccountId; set => this._storageAccountId = value; } + + /// Backing field for property. + private string _subnetId; + + /// + /// Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be + /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent + /// the subnet. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettings _targetDiskNetworkAccessSetting; + + /// Specifies target network access settings for disks of VM to be restored, + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettings TargetDiskNetworkAccessSetting { get => (this._targetDiskNetworkAccessSetting = this._targetDiskNetworkAccessSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TargetDiskNetworkAccessSettings()); set => this._targetDiskNetworkAccessSetting = value; } + + /// + /// Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string TargetDiskNetworkAccessSettingTargetDiskAccessId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettingsInternal)TargetDiskNetworkAccessSetting).TargetDiskAccessId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettingsInternal)TargetDiskNetworkAccessSetting).TargetDiskAccessId = value ?? null; } + + /// Network access settings to be used for restored disks + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption? TargetDiskNetworkAccessSettingTargetDiskNetworkAccessOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettingsInternal)TargetDiskNetworkAccessSetting).TargetDiskNetworkAccessOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettingsInternal)TargetDiskNetworkAccessSetting).TargetDiskNetworkAccessOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption)""); } + + /// Backing field for property. + private string _targetDomainNameId; + + /// + /// Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic + /// Virtual Machines. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetDomainNameId { get => this._targetDomainNameId; set => this._targetDomainNameId = value; } + + /// Backing field for property. + private string _targetResourceGroupId; + + /// + /// This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetResourceGroupId { get => this._targetResourceGroupId; set => this._targetResourceGroupId = value; } + + /// Backing field for property. + private string _targetVirtualMachineId; + + /// + /// This is the complete ARM Id of the VM that will be created. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetVirtualMachineId { get => this._targetVirtualMachineId; set => this._targetVirtualMachineId = value; } + + /// Backing field for property. + private string _virtualNetworkId; + + /// + /// This is the virtual network Id of the vnet that will be attached to the virtual machine. + /// User will be validated for join action permissions in the linked access. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualNetworkId { get => this._virtualNetworkId; set => this._virtualNetworkId = value; } + + /// Backing field for property. + private string[] _zone; + + /// Target zone where the VM and its disks should be restored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Zone { get => this._zone; set => this._zone = value; } + + /// Creates an new instance. + public IaasVMRestoreRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__restoreRequest), __restoreRequest); + await eventListener.AssertObjectIsValid(nameof(__restoreRequest), __restoreRequest); + } + } + /// IaaS VM workload-specific restore. + public partial interface IIaasVMRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest + { + /// + /// Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines.", + SerializedName = @"affinityGroup", + PossibleTypes = new [] { typeof(string) })] + string AffinityGroup { get; set; } + /// + /// Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same + /// cloud service as it was at the time of backup. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same + cloud service as it was at the time of backup.", + SerializedName = @"createNewCloudService", + PossibleTypes = new [] { typeof(bool) })] + bool? CreateNewCloudService { get; set; } + /// + /// DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key.", + SerializedName = @"diskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string DiskEncryptionSetId { get; set; } + /// + /// Identifies whether this backup copy represents an encrypted VM at the time of backup. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifies whether this backup copy represents an encrypted VM at the time of backup.", + SerializedName = @"encryptionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? EncryptionDetailEncryptionEnabled { get; set; } + /// Key Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Url.", + SerializedName = @"kekUrl", + PossibleTypes = new [] { typeof(string) })] + string EncryptionDetailKekUrl { get; set; } + /// ID of Key Vault where KEK is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of Key Vault where KEK is stored.", + SerializedName = @"kekVaultId", + PossibleTypes = new [] { typeof(string) })] + string EncryptionDetailKekVaultId { get; set; } + /// Secret Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Secret Url.", + SerializedName = @"secretKeyUrl", + PossibleTypes = new [] { typeof(string) })] + string EncryptionDetailSecretKeyUrl { get; set; } + /// ID of Key Vault where Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of Key Vault where Secret is stored.", + SerializedName = @"secretKeyVaultId", + PossibleTypes = new [] { typeof(string) })] + string EncryptionDetailSecretKeyVaultId { get; set; } + /// Name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the extended location.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string ExtendedLocationName { get; set; } + /// Type of the extended location. Possible values include: 'EdgeZone' + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the extended location. Possible values include: 'EdgeZone'", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string ExtendedLocationType { get; set; } + /// Gets the class type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the class type.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string IdentityBasedRestoreDetailObjectType { get; set; } + /// Fully qualified ARM ID of the target storage account. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM ID of the target storage account.", + SerializedName = @"targetStorageAccountId", + PossibleTypes = new [] { typeof(string) })] + string IdentityBasedRestoreDetailTargetStorageAccountId { get; set; } + /// To differentiate if the managed identity is system assigned or user assigned + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To differentiate if the managed identity is system assigned or user assigned", + SerializedName = @"isSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool? IdentityInfoIsSystemAssignedIdentity { get; set; } + /// + /// Managed Identity Resource Id + /// Optional: Might not be required in the case of system assigned managed identity + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Managed Identity Resource Id + Optional: Might not be required in the case of system assigned managed identity", + SerializedName = @"managedIdentityResourceId", + PossibleTypes = new [] { typeof(string) })] + string IdentityInfoManagedIdentityResourceId { get; set; } + /// Original Storage Account Option + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Original Storage Account Option", + SerializedName = @"originalStorageAccountOption", + PossibleTypes = new [] { typeof(bool) })] + bool? OriginalStorageAccountOption { get; set; } + /// ID of the backup copy to be recovered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the backup copy to be recovered.", + SerializedName = @"recoveryPointId", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointId { get; set; } + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of this recovery.", + SerializedName = @"recoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get; set; } + /// Region in which the virtual machine is restored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Region in which the virtual machine is restored.", + SerializedName = @"region", + PossibleTypes = new [] { typeof(string) })] + string Region { get; set; } + /// List of Disk LUNs for partial restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of Disk LUNs for partial restore", + SerializedName = @"restoreDiskLunList", + PossibleTypes = new [] { typeof(int) })] + int[] RestoreDiskLunList { get; set; } + /// Flag to denote of an Unmanaged disk VM should be restored with Managed disks. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to denote of an Unmanaged disk VM should be restored with Managed disks.", + SerializedName = @"restoreWithManagedDisks", + PossibleTypes = new [] { typeof(bool) })] + bool? RestoreWithManagedDisk { get; set; } + /// Gets or Sets Disk Encryption Set Id for Secured VM OS Disk + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or Sets Disk Encryption Set Id for Secured VM OS Disk", + SerializedName = @"securedVMOsDiskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string SecuredVMDetailSecuredVmosdiskEncryptionSetId { get; set; } + /// Fully qualified ARM ID of the VM which is being recovered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM ID of the VM which is being recovered.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + /// + /// Fully qualified ARM ID of the storage account to which the VM has to be restored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM ID of the storage account to which the VM has to be restored.", + SerializedName = @"storageAccountId", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountId { get; set; } + /// + /// Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be + /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent + /// the subnet. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be + {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent + the subnet.", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// + /// Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew", + SerializedName = @"targetDiskAccessId", + PossibleTypes = new [] { typeof(string) })] + string TargetDiskNetworkAccessSettingTargetDiskAccessId { get; set; } + /// Network access settings to be used for restored disks + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Network access settings to be used for restored disks", + SerializedName = @"targetDiskNetworkAccessOption", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption? TargetDiskNetworkAccessSettingTargetDiskNetworkAccessOption { get; set; } + /// + /// Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic + /// Virtual Machines. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic + Virtual Machines.", + SerializedName = @"targetDomainNameId", + PossibleTypes = new [] { typeof(string) })] + string TargetDomainNameId { get; set; } + /// + /// This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. + For e.g. /subscriptions/{subId}/resourcegroups/{rg}", + SerializedName = @"targetResourceGroupId", + PossibleTypes = new [] { typeof(string) })] + string TargetResourceGroupId { get; set; } + /// + /// This is the complete ARM Id of the VM that will be created. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the complete ARM Id of the VM that will be created. + For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}", + SerializedName = @"targetVirtualMachineId", + PossibleTypes = new [] { typeof(string) })] + string TargetVirtualMachineId { get; set; } + /// + /// This is the virtual network Id of the vnet that will be attached to the virtual machine. + /// User will be validated for join action permissions in the linked access. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the virtual network Id of the vnet that will be attached to the virtual machine. + User will be validated for join action permissions in the linked access.", + SerializedName = @"virtualNetworkId", + PossibleTypes = new [] { typeof(string) })] + string VirtualNetworkId { get; set; } + /// Target zone where the VM and its disks should be restored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Target zone where the VM and its disks should be restored.", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + string[] Zone { get; set; } + + } + /// IaaS VM workload-specific restore. + internal partial interface IIaasVMRestoreRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal + { + /// + /// Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. + /// + string AffinityGroup { get; set; } + /// + /// Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same + /// cloud service as it was at the time of backup. + /// + bool? CreateNewCloudService { get; set; } + /// + /// DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key. + /// + string DiskEncryptionSetId { get; set; } + /// Details needed if the VM was encrypted at the time of backup. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetails EncryptionDetail { get; set; } + /// + /// Identifies whether this backup copy represents an encrypted VM at the time of backup. + /// + bool? EncryptionDetailEncryptionEnabled { get; set; } + /// Key Url. + string EncryptionDetailKekUrl { get; set; } + /// ID of Key Vault where KEK is stored. + string EncryptionDetailKekVaultId { get; set; } + /// Secret Url. + string EncryptionDetailSecretKeyUrl { get; set; } + /// ID of Key Vault where Secret is stored. + string EncryptionDetailSecretKeyVaultId { get; set; } + /// + /// Target extended location where the VM should be restored, + /// should be null if restore is to be done in public cloud + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation ExtendedLocation { get; set; } + /// Name of the extended location. + string ExtendedLocationName { get; set; } + /// Type of the extended location. Possible values include: 'EdgeZone' + string ExtendedLocationType { get; set; } + /// IaaS VM workload specific restore details for restores using managed identity. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetails IdentityBasedRestoreDetail { get; set; } + /// Gets the class type. + string IdentityBasedRestoreDetailObjectType { get; set; } + /// Fully qualified ARM ID of the target storage account. + string IdentityBasedRestoreDetailTargetStorageAccountId { get; set; } + /// Managed Identity information required to access customer storage account. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfo IdentityInfo { get; set; } + /// To differentiate if the managed identity is system assigned or user assigned + bool? IdentityInfoIsSystemAssignedIdentity { get; set; } + /// + /// Managed Identity Resource Id + /// Optional: Might not be required in the case of system assigned managed identity + /// + string IdentityInfoManagedIdentityResourceId { get; set; } + /// Original Storage Account Option + bool? OriginalStorageAccountOption { get; set; } + /// ID of the backup copy to be recovered. + string RecoveryPointId { get; set; } + /// Type of this recovery. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get; set; } + /// Region in which the virtual machine is restored. + string Region { get; set; } + /// List of Disk LUNs for partial restore + int[] RestoreDiskLunList { get; set; } + /// Flag to denote of an Unmanaged disk VM should be restored with Managed disks. + bool? RestoreWithManagedDisk { get; set; } + /// Stores Secured VM Details + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetails SecuredVMDetail { get; set; } + /// Gets or Sets Disk Encryption Set Id for Secured VM OS Disk + string SecuredVMDetailSecuredVmosdiskEncryptionSetId { get; set; } + /// Fully qualified ARM ID of the VM which is being recovered. + string SourceResourceId { get; set; } + /// + /// Fully qualified ARM ID of the storage account to which the VM has to be restored. + /// + string StorageAccountId { get; set; } + /// + /// Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be + /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent + /// the subnet. + /// + string SubnetId { get; set; } + /// Specifies target network access settings for disks of VM to be restored, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettings TargetDiskNetworkAccessSetting { get; set; } + /// + /// Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew + /// + string TargetDiskNetworkAccessSettingTargetDiskAccessId { get; set; } + /// Network access settings to be used for restored disks + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption? TargetDiskNetworkAccessSettingTargetDiskNetworkAccessOption { get; set; } + /// + /// Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic + /// Virtual Machines. + /// + string TargetDomainNameId { get; set; } + /// + /// This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} + /// + string TargetResourceGroupId { get; set; } + /// + /// This is the complete ARM Id of the VM that will be created. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + string TargetVirtualMachineId { get; set; } + /// + /// This is the virtual network Id of the vnet that will be attached to the virtual machine. + /// User will be validated for join action permissions in the linked access. + /// + string VirtualNetworkId { get; set; } + /// Target zone where the VM and its disks should be restored. + string[] Zone { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreRequest.json.cs new file mode 100644 index 000000000000..4406e605ea7c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreRequest.json.cs @@ -0,0 +1,185 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload-specific restore. + public partial class IaasVMRestoreRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequest interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "IaasVMRestoreWithRehydrationRequest": + { + return new IaasVMRestoreWithRehydrationRequest(json); + } + } + return new IaasVMRestoreRequest(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IaasVMRestoreRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __restoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest(json); + {_encryptionDetail = If( json?.PropertyT("encryptionDetails"), out var __jsonEncryptionDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.EncryptionDetails.FromJson(__jsonEncryptionDetails) : EncryptionDetail;} + {_identityInfo = If( json?.PropertyT("identityInfo"), out var __jsonIdentityInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IdentityInfo.FromJson(__jsonIdentityInfo) : IdentityInfo;} + {_identityBasedRestoreDetail = If( json?.PropertyT("identityBasedRestoreDetails"), out var __jsonIdentityBasedRestoreDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IdentityBasedRestoreDetails.FromJson(__jsonIdentityBasedRestoreDetails) : IdentityBasedRestoreDetail;} + {_extendedLocation = If( json?.PropertyT("extendedLocation"), out var __jsonExtendedLocation) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ExtendedLocation.FromJson(__jsonExtendedLocation) : ExtendedLocation;} + {_securedVMDetail = If( json?.PropertyT("securedVMDetails"), out var __jsonSecuredVMDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SecuredVMDetails.FromJson(__jsonSecuredVMDetails) : SecuredVMDetail;} + {_targetDiskNetworkAccessSetting = If( json?.PropertyT("targetDiskNetworkAccessSettings"), out var __jsonTargetDiskNetworkAccessSettings) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TargetDiskNetworkAccessSettings.FromJson(__jsonTargetDiskNetworkAccessSettings) : TargetDiskNetworkAccessSetting;} + {_recoveryPointId = If( json?.PropertyT("recoveryPointId"), out var __jsonRecoveryPointId) ? (string)__jsonRecoveryPointId : (string)RecoveryPointId;} + {_recoveryType = If( json?.PropertyT("recoveryType"), out var __jsonRecoveryType) ? (string)__jsonRecoveryType : (string)RecoveryType;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + {_targetVirtualMachineId = If( json?.PropertyT("targetVirtualMachineId"), out var __jsonTargetVirtualMachineId) ? (string)__jsonTargetVirtualMachineId : (string)TargetVirtualMachineId;} + {_targetResourceGroupId = If( json?.PropertyT("targetResourceGroupId"), out var __jsonTargetResourceGroupId) ? (string)__jsonTargetResourceGroupId : (string)TargetResourceGroupId;} + {_storageAccountId = If( json?.PropertyT("storageAccountId"), out var __jsonStorageAccountId) ? (string)__jsonStorageAccountId : (string)StorageAccountId;} + {_virtualNetworkId = If( json?.PropertyT("virtualNetworkId"), out var __jsonVirtualNetworkId) ? (string)__jsonVirtualNetworkId : (string)VirtualNetworkId;} + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)SubnetId;} + {_targetDomainNameId = If( json?.PropertyT("targetDomainNameId"), out var __jsonTargetDomainNameId) ? (string)__jsonTargetDomainNameId : (string)TargetDomainNameId;} + {_region = If( json?.PropertyT("region"), out var __jsonRegion) ? (string)__jsonRegion : (string)Region;} + {_affinityGroup = If( json?.PropertyT("affinityGroup"), out var __jsonAffinityGroup) ? (string)__jsonAffinityGroup : (string)AffinityGroup;} + {_createNewCloudService = If( json?.PropertyT("createNewCloudService"), out var __jsonCreateNewCloudService) ? (bool?)__jsonCreateNewCloudService : CreateNewCloudService;} + {_originalStorageAccountOption = If( json?.PropertyT("originalStorageAccountOption"), out var __jsonOriginalStorageAccountOption) ? (bool?)__jsonOriginalStorageAccountOption : OriginalStorageAccountOption;} + {_restoreDiskLunList = If( json?.PropertyT("restoreDiskLunList"), out var __jsonRestoreDiskLunList) ? If( __jsonRestoreDiskLunList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(int) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber __t ? (int)__t : default(int))) ))() : null : RestoreDiskLunList;} + {_restoreWithManagedDisk = If( json?.PropertyT("restoreWithManagedDisks"), out var __jsonRestoreWithManagedDisks) ? (bool?)__jsonRestoreWithManagedDisks : RestoreWithManagedDisk;} + {_diskEncryptionSetId = If( json?.PropertyT("diskEncryptionSetId"), out var __jsonDiskEncryptionSetId) ? (string)__jsonDiskEncryptionSetId : (string)DiskEncryptionSetId;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : Zone;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __restoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._encryptionDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._encryptionDetail.ToJson(null,serializationMode) : null, "encryptionDetails" ,container.Add ); + AddIf( null != this._identityInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._identityInfo.ToJson(null,serializationMode) : null, "identityInfo" ,container.Add ); + AddIf( null != this._identityBasedRestoreDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._identityBasedRestoreDetail.ToJson(null,serializationMode) : null, "identityBasedRestoreDetails" ,container.Add ); + AddIf( null != this._extendedLocation ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedLocation.ToJson(null,serializationMode) : null, "extendedLocation" ,container.Add ); + AddIf( null != this._securedVMDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._securedVMDetail.ToJson(null,serializationMode) : null, "securedVMDetails" ,container.Add ); + AddIf( null != this._targetDiskNetworkAccessSetting ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._targetDiskNetworkAccessSetting.ToJson(null,serializationMode) : null, "targetDiskNetworkAccessSettings" ,container.Add ); + AddIf( null != (((object)this._recoveryPointId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointId.ToString()) : null, "recoveryPointId" ,container.Add ); + AddIf( null != (((object)this._recoveryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryType.ToString()) : null, "recoveryType" ,container.Add ); + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AddIf( null != (((object)this._targetVirtualMachineId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetVirtualMachineId.ToString()) : null, "targetVirtualMachineId" ,container.Add ); + AddIf( null != (((object)this._targetResourceGroupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetResourceGroupId.ToString()) : null, "targetResourceGroupId" ,container.Add ); + AddIf( null != (((object)this._storageAccountId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._storageAccountId.ToString()) : null, "storageAccountId" ,container.Add ); + AddIf( null != (((object)this._virtualNetworkId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualNetworkId.ToString()) : null, "virtualNetworkId" ,container.Add ); + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + AddIf( null != (((object)this._targetDomainNameId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetDomainNameId.ToString()) : null, "targetDomainNameId" ,container.Add ); + AddIf( null != (((object)this._region)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._region.ToString()) : null, "region" ,container.Add ); + AddIf( null != (((object)this._affinityGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._affinityGroup.ToString()) : null, "affinityGroup" ,container.Add ); + AddIf( null != this._createNewCloudService ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._createNewCloudService) : null, "createNewCloudService" ,container.Add ); + AddIf( null != this._originalStorageAccountOption ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._originalStorageAccountOption) : null, "originalStorageAccountOption" ,container.Add ); + if (null != this._restoreDiskLunList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._restoreDiskLunList ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber(__x) ,__w.Add); + } + container.Add("restoreDiskLunList",__w); + } + AddIf( null != this._restoreWithManagedDisk ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._restoreWithManagedDisk) : null, "restoreWithManagedDisks" ,container.Add ); + AddIf( null != (((object)this._diskEncryptionSetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._diskEncryptionSetId.ToString()) : null, "diskEncryptionSetId" ,container.Add ); + if (null != this._zone) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._zone ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("zones",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreWithRehydrationRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreWithRehydrationRequest.cs new file mode 100644 index 000000000000..74d0771d7a83 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreWithRehydrationRequest.cs @@ -0,0 +1,298 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// IaaS VM workload-specific restore with integrated rehydration of recovery point. + /// + public partial class IaasVMRestoreWithRehydrationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreWithRehydrationRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreWithRehydrationRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequest __iaasVMRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaasVMRestoreRequest(); + + /// + /// Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string AffinityGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).AffinityGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).AffinityGroup = value ?? null; } + + /// + /// Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same + /// cloud service as it was at the time of backup. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? CreateNewCloudService { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).CreateNewCloudService; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).CreateNewCloudService = value ?? default(bool); } + + /// + /// DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).DiskEncryptionSetId = value ?? null; } + + /// Details needed if the VM was encrypted at the time of backup. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IEncryptionDetails EncryptionDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetail = value ?? null /* model class */; } + + /// + /// Identifies whether this backup copy represents an encrypted VM at the time of backup. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? EncryptionDetailEncryptionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailEncryptionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailEncryptionEnabled = value ?? default(bool); } + + /// Key Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EncryptionDetailKekUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailKekUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailKekUrl = value ?? null; } + + /// ID of Key Vault where KEK is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EncryptionDetailKekVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailKekVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailKekVaultId = value ?? null; } + + /// Secret Url. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EncryptionDetailSecretKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailSecretKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailSecretKeyUrl = value ?? null; } + + /// ID of Key Vault where Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EncryptionDetailSecretKeyVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailSecretKeyVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).EncryptionDetailSecretKeyVaultId = value ?? null; } + + /// + /// Target extended location where the VM should be restored, + /// should be null if restore is to be done in public cloud + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IExtendedLocation ExtendedLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).ExtendedLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).ExtendedLocation = value ?? null /* model class */; } + + /// Name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedLocationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).ExtendedLocationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).ExtendedLocationName = value ?? null; } + + /// Type of the extended location. Possible values include: 'EdgeZone' + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ExtendedLocationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).ExtendedLocationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).ExtendedLocationType = value ?? null; } + + /// IaaS VM workload specific restore details for restores using managed identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetails IdentityBasedRestoreDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityBasedRestoreDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityBasedRestoreDetail = value ?? null /* model class */; } + + /// Gets the class type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string IdentityBasedRestoreDetailObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityBasedRestoreDetailObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityBasedRestoreDetailObjectType = value ?? null; } + + /// Fully qualified ARM ID of the target storage account. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string IdentityBasedRestoreDetailTargetStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityBasedRestoreDetailTargetStorageAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityBasedRestoreDetailTargetStorageAccountId = value ?? null; } + + /// Managed Identity information required to access customer storage account. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfo IdentityInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityInfo = value ?? null /* model class */; } + + /// To differentiate if the managed identity is system assigned or user assigned + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IdentityInfoIsSystemAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityInfoIsSystemAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityInfoIsSystemAssignedIdentity = value ?? default(bool); } + + /// + /// Managed Identity Resource Id + /// Optional: Might not be required in the case of system assigned managed identity + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string IdentityInfoManagedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityInfoManagedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).IdentityInfoManagedIdentityResourceId = value ?? null; } + + /// Internal Acessors for RecoveryPointRehydrationInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreWithRehydrationRequestInternal.RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set { {_recoveryPointRehydrationInfo = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__iaasVMRestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__iaasVMRestoreRequest).ObjectType = value ; } + + /// Original Storage Account Option + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? OriginalStorageAccountOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).OriginalStorageAccountOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).OriginalStorageAccountOption = value ?? default(bool); } + + /// ID of the backup copy to be recovered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RecoveryPointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).RecoveryPointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).RecoveryPointId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo _recoveryPointRehydrationInfo; + + /// RP Rehydration Info + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get => (this._recoveryPointRehydrationInfo = this._recoveryPointRehydrationInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo()); set => this._recoveryPointRehydrationInfo = value; } + + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationPriority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority)""); } + + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal)RecoveryPointRehydrationInfo).RehydrationRetentionDuration = value ?? null; } + + /// Type of this recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType? RecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).RecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).RecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType)""); } + + /// Region in which the virtual machine is restored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Region { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).Region; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).Region = value ?? null; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__iaasVMRestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)__iaasVMRestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// List of Disk LUNs for partial restore + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int[] RestoreDiskLunList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).RestoreDiskLunList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).RestoreDiskLunList = value ?? null /* arrayOf */; } + + /// Flag to denote of an Unmanaged disk VM should be restored with Managed disks. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? RestoreWithManagedDisk { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).RestoreWithManagedDisk; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).RestoreWithManagedDisk = value ?? default(bool); } + + /// Stores Secured VM Details + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetails SecuredVMDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).SecuredVMDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).SecuredVMDetail = value ?? null /* model class */; } + + /// Gets or Sets Disk Encryption Set Id for Secured VM OS Disk + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SecuredVMDetailSecuredVmosdiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).SecuredVMDetailSecuredVmosdiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).SecuredVMDetailSecuredVmosdiskEncryptionSetId = value ?? null; } + + /// Fully qualified ARM ID of the VM which is being recovered. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).SourceResourceId = value ?? null; } + + /// + /// Fully qualified ARM ID of the storage account to which the VM has to be restored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string StorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).StorageAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).StorageAccountId = value ?? null; } + + /// + /// Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be + /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent + /// the subnet. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).SubnetId = value ?? null; } + + /// Specifies target network access settings for disks of VM to be restored, + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettings TargetDiskNetworkAccessSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetDiskNetworkAccessSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetDiskNetworkAccessSetting = value ?? null /* model class */; } + + /// + /// Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetDiskNetworkAccessSettingTargetDiskAccessId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetDiskNetworkAccessSettingTargetDiskAccessId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetDiskNetworkAccessSettingTargetDiskAccessId = value ?? null; } + + /// Network access settings to be used for restored disks + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption? TargetDiskNetworkAccessSettingTargetDiskNetworkAccessOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetDiskNetworkAccessSettingTargetDiskNetworkAccessOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetDiskNetworkAccessSettingTargetDiskNetworkAccessOption = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption)""); } + + /// + /// Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic + /// Virtual Machines. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetDomainNameId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetDomainNameId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetDomainNameId = value ?? null; } + + /// + /// This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetResourceGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetResourceGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetResourceGroupId = value ?? null; } + + /// + /// This is the complete ARM Id of the VM that will be created. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string TargetVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).TargetVirtualMachineId = value ?? null; } + + /// + /// This is the virtual network Id of the vnet that will be attached to the virtual machine. + /// User will be validated for join action permissions in the linked access. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VirtualNetworkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).VirtualNetworkId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).VirtualNetworkId = value ?? null; } + + /// Target zone where the VM and its disks should be restored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] Zone { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).Zone; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal)__iaasVMRestoreRequest).Zone = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public IaasVMRestoreWithRehydrationRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__iaasVMRestoreRequest), __iaasVMRestoreRequest); + await eventListener.AssertObjectIsValid(nameof(__iaasVMRestoreRequest), __iaasVMRestoreRequest); + } + } + /// IaaS VM workload-specific restore with integrated rehydration of recovery point. + public partial interface IIaasVMRestoreWithRehydrationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequest + { + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rehydration Priority", + SerializedName = @"rehydrationPriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. ""P7D""", + SerializedName = @"rehydrationRetentionDuration", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } + /// IaaS VM workload-specific restore with integrated rehydration of recovery point. + internal partial interface IIaasVMRestoreWithRehydrationRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreRequestInternal + { + /// RP Rehydration Info + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + /// Rehydration Priority + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RecoveryPointRehydrationInfoRehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + string RecoveryPointRehydrationInfoRehydrationRetentionDuration { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreWithRehydrationRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreWithRehydrationRequest.json.cs new file mode 100644 index 000000000000..45ba352bbb8c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVMRestoreWithRehydrationRequest.json.cs @@ -0,0 +1,113 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// IaaS VM workload-specific restore with integrated rehydration of recovery point. + /// + public partial class IaasVMRestoreWithRehydrationRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreWithRehydrationRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreWithRehydrationRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVMRestoreWithRehydrationRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new IaasVMRestoreWithRehydrationRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IaasVMRestoreWithRehydrationRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __iaasVMRestoreRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IaasVMRestoreRequest(json); + {_recoveryPointRehydrationInfo = If( json?.PropertyT("recoveryPointRehydrationInfo"), out var __jsonRecoveryPointRehydrationInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointRehydrationInfo.FromJson(__jsonRecoveryPointRehydrationInfo) : RecoveryPointRehydrationInfo;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __iaasVMRestoreRequest?.ToJson(container, serializationMode); + AddIf( null != this._recoveryPointRehydrationInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryPointRehydrationInfo.ToJson(null,serializationMode) : null, "recoveryPointRehydrationInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVmilrRegistrationRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVmilrRegistrationRequest.cs new file mode 100644 index 000000000000..d7a95a20e484 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVmilrRegistrationRequest.cs @@ -0,0 +1,133 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Restore files/folders from a backup copy of IaaS VM. + public partial class IaasVmilrRegistrationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVmilrRegistrationRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVmilrRegistrationRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest __ilrRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IlrRequest(); + + /// Backing field for property. + private string _initiatorName; + + /// iSCSI initiator name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string InitiatorName { get => this._initiatorName; set => this._initiatorName = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestInternal)__ilrRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestInternal)__ilrRequest).ObjectType = value ; } + + /// Backing field for property. + private string _recoveryPointId; + + /// ID of the IaaS VM backup copy from where the files/folders have to be restored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointId { get => this._recoveryPointId; set => this._recoveryPointId = value; } + + /// Backing field for property. + private bool? _renewExistingRegistration; + + /// Whether to renew existing registration with the iSCSI server. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? RenewExistingRegistration { get => this._renewExistingRegistration; set => this._renewExistingRegistration = value; } + + /// Backing field for property. + private string _virtualMachineId; + + /// + /// Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VirtualMachineId { get => this._virtualMachineId; set => this._virtualMachineId = value; } + + /// Creates an new instance. + public IaasVmilrRegistrationRequest() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__ilrRequest), __ilrRequest); + await eventListener.AssertObjectIsValid(nameof(__ilrRequest), __ilrRequest); + } + } + /// Restore files/folders from a backup copy of IaaS VM. + public partial interface IIaasVmilrRegistrationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest + { + /// iSCSI initiator name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"iSCSI initiator name.", + SerializedName = @"initiatorName", + PossibleTypes = new [] { typeof(string) })] + string InitiatorName { get; set; } + /// ID of the IaaS VM backup copy from where the files/folders have to be restored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the IaaS VM backup copy from where the files/folders have to be restored.", + SerializedName = @"recoveryPointId", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointId { get; set; } + /// Whether to renew existing registration with the iSCSI server. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to renew existing registration with the iSCSI server.", + SerializedName = @"renewExistingRegistration", + PossibleTypes = new [] { typeof(bool) })] + bool? RenewExistingRegistration { get; set; } + /// + /// Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored.", + SerializedName = @"virtualMachineId", + PossibleTypes = new [] { typeof(string) })] + string VirtualMachineId { get; set; } + + } + /// Restore files/folders from a backup copy of IaaS VM. + internal partial interface IIaasVmilrRegistrationRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestInternal + { + /// iSCSI initiator name. + string InitiatorName { get; set; } + /// ID of the IaaS VM backup copy from where the files/folders have to be restored. + string RecoveryPointId { get; set; } + /// Whether to renew existing registration with the iSCSI server. + bool? RenewExistingRegistration { get; set; } + /// + /// Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. + /// + string VirtualMachineId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVmilrRegistrationRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVmilrRegistrationRequest.json.cs new file mode 100644 index 000000000000..f0aa619fd861 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IaasVmilrRegistrationRequest.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Restore files/folders from a backup copy of IaaS VM. + public partial class IaasVmilrRegistrationRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVmilrRegistrationRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVmilrRegistrationRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIaasVmilrRegistrationRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new IaasVmilrRegistrationRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IaasVmilrRegistrationRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __ilrRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IlrRequest(json); + {_recoveryPointId = If( json?.PropertyT("recoveryPointId"), out var __jsonRecoveryPointId) ? (string)__jsonRecoveryPointId : (string)RecoveryPointId;} + {_virtualMachineId = If( json?.PropertyT("virtualMachineId"), out var __jsonVirtualMachineId) ? (string)__jsonVirtualMachineId : (string)VirtualMachineId;} + {_initiatorName = If( json?.PropertyT("initiatorName"), out var __jsonInitiatorName) ? (string)__jsonInitiatorName : (string)InitiatorName;} + {_renewExistingRegistration = If( json?.PropertyT("renewExistingRegistration"), out var __jsonRenewExistingRegistration) ? (bool?)__jsonRenewExistingRegistration : RenewExistingRegistration;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __ilrRequest?.ToJson(container, serializationMode); + AddIf( null != (((object)this._recoveryPointId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointId.ToString()) : null, "recoveryPointId" ,container.Add ); + AddIf( null != (((object)this._virtualMachineId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._virtualMachineId.ToString()) : null, "virtualMachineId" ,container.Add ); + AddIf( null != (((object)this._initiatorName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._initiatorName.ToString()) : null, "initiatorName" ,container.Add ); + AddIf( null != this._renewExistingRegistration ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._renewExistingRegistration) : null, "renewExistingRegistration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityBasedRestoreDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityBasedRestoreDetails.cs new file mode 100644 index 000000000000..220c437ff76e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityBasedRestoreDetails.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload specific restore details for restores using managed identity + public partial class IdentityBasedRestoreDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetailsInternal + { + + /// Backing field for property. + private string _objectType; + + /// Gets the class type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Backing field for property. + private string _targetStorageAccountId; + + /// Fully qualified ARM ID of the target storage account. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetStorageAccountId { get => this._targetStorageAccountId; set => this._targetStorageAccountId = value; } + + /// Creates an new instance. + public IdentityBasedRestoreDetails() + { + + } + } + /// IaaS VM workload specific restore details for restores using managed identity + public partial interface IIdentityBasedRestoreDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Gets the class type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the class type.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + /// Fully qualified ARM ID of the target storage account. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fully qualified ARM ID of the target storage account.", + SerializedName = @"targetStorageAccountId", + PossibleTypes = new [] { typeof(string) })] + string TargetStorageAccountId { get; set; } + + } + /// IaaS VM workload specific restore details for restores using managed identity + internal partial interface IIdentityBasedRestoreDetailsInternal + + { + /// Gets the class type. + string ObjectType { get; set; } + /// Fully qualified ARM ID of the target storage account. + string TargetStorageAccountId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityBasedRestoreDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityBasedRestoreDetails.json.cs new file mode 100644 index 000000000000..0cf09a70e0dd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityBasedRestoreDetails.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// IaaS VM workload specific restore details for restores using managed identity + public partial class IdentityBasedRestoreDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityBasedRestoreDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new IdentityBasedRestoreDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IdentityBasedRestoreDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + {_targetStorageAccountId = If( json?.PropertyT("targetStorageAccountId"), out var __jsonTargetStorageAccountId) ? (string)__jsonTargetStorageAccountId : (string)TargetStorageAccountId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AddIf( null != (((object)this._targetStorageAccountId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetStorageAccountId.ToString()) : null, "targetStorageAccountId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityInfo.cs new file mode 100644 index 000000000000..02533bb4d2ae --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityInfo.cs @@ -0,0 +1,78 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Encapsulates Managed Identity related information + public partial class IdentityInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfoInternal + { + + /// Backing field for property. + private bool? _isSystemAssignedIdentity; + + /// To differentiate if the managed identity is system assigned or user assigned + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsSystemAssignedIdentity { get => this._isSystemAssignedIdentity; set => this._isSystemAssignedIdentity = value; } + + /// Backing field for property. + private string _managedIdentityResourceId; + + /// + /// Managed Identity Resource Id + /// Optional: Might not be required in the case of system assigned managed identity + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ManagedIdentityResourceId { get => this._managedIdentityResourceId; set => this._managedIdentityResourceId = value; } + + /// Creates an new instance. + public IdentityInfo() + { + + } + } + /// Encapsulates Managed Identity related information + public partial interface IIdentityInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// To differentiate if the managed identity is system assigned or user assigned + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To differentiate if the managed identity is system assigned or user assigned", + SerializedName = @"isSystemAssignedIdentity", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSystemAssignedIdentity { get; set; } + /// + /// Managed Identity Resource Id + /// Optional: Might not be required in the case of system assigned managed identity + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Managed Identity Resource Id + Optional: Might not be required in the case of system assigned managed identity", + SerializedName = @"managedIdentityResourceId", + PossibleTypes = new [] { typeof(string) })] + string ManagedIdentityResourceId { get; set; } + + } + /// Encapsulates Managed Identity related information + internal partial interface IIdentityInfoInternal + + { + /// To differentiate if the managed identity is system assigned or user assigned + bool? IsSystemAssignedIdentity { get; set; } + /// + /// Managed Identity Resource Id + /// Optional: Might not be required in the case of system assigned managed identity + /// + string ManagedIdentityResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityInfo.json.cs new file mode 100644 index 000000000000..5cb69eb23d7d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IdentityInfo.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Encapsulates Managed Identity related information + public partial class IdentityInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIdentityInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new IdentityInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IdentityInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_isSystemAssignedIdentity = If( json?.PropertyT("isSystemAssignedIdentity"), out var __jsonIsSystemAssignedIdentity) ? (bool?)__jsonIsSystemAssignedIdentity : IsSystemAssignedIdentity;} + {_managedIdentityResourceId = If( json?.PropertyT("managedIdentityResourceId"), out var __jsonManagedIdentityResourceId) ? (string)__jsonManagedIdentityResourceId : (string)ManagedIdentityResourceId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._isSystemAssignedIdentity ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isSystemAssignedIdentity) : null, "isSystemAssignedIdentity" ,container.Add ); + AddIf( null != (((object)this._managedIdentityResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._managedIdentityResourceId.ToString()) : null, "managedIdentityResourceId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequest.cs new file mode 100644 index 000000000000..f5ec0cabc7e2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequest.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Parameters to Provision ILR API. + public partial class IlrRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Creates an new instance. + public IlrRequest() + { + + } + } + /// Parameters to Provision ILR API. + public partial interface IIlrRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Parameters to Provision ILR API. + internal partial interface IIlrRequestInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequest.json.cs new file mode 100644 index 000000000000..b8f5d26b9329 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequest.json.cs @@ -0,0 +1,127 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Parameters to Provision ILR API. + public partial class IlrRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureFileShareProvisionILRRequest": + { + return new AzureFileShareProvisionIlrRequest(json); + } + case "IaasVMILRRegistrationRequest": + { + return new IaasVmilrRegistrationRequest(json); + } + } + return new IlrRequest(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IlrRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequestResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequestResource.cs new file mode 100644 index 000000000000..d10de3c2d6b1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequestResource.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Parameters to Provision ILR API. + public partial class IlrRequestResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IlrRequest()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestInternal)Property).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestInternal)Property).ObjectType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest _property; + + /// ILRRequestResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IlrRequest()); set => this._property = value; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public IlrRequestResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Parameters to Provision ILR API. + public partial interface IIlrRequestResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Parameters to Provision ILR API. + internal partial interface IIlrRequestResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + /// ILRRequestResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequest Property { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequestResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequestResource.json.cs new file mode 100644 index 000000000000..97b2890bb44f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/IlrRequestResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Parameters to Provision ILR API. + public partial class IlrRequestResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new IlrRequestResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal IlrRequestResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IlrRequest.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryInfo.cs new file mode 100644 index 000000000000..34cd1fe1595d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryInfo.cs @@ -0,0 +1,151 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Details about inquired protectable items under a given container. + public partial class InquiryInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail _errorDetail; + + /// Error Details if the Status is non-success. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail()); set => this._errorDetail = value; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Code; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Message; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Recommendation; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] _inquiryDetail; + + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryDetail { get => this._inquiryDetail; set => this._inquiryDetail = value; } + + /// Internal Acessors for ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal.ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail()); set { {_errorDetail = value;} } } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Code = value; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Message = value; } + + /// Internal Acessors for ErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfoInternal.ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Recommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Recommendation = value; } + + /// Backing field for property. + private string _status; + + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public InquiryInfo() + { + + } + } + /// Details about inquired protectable items under a given container. + public partial interface IInquiryInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; } + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Message related to the Code.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; } + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of recommendation strings.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] ErrorDetailRecommendation { get; } + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Inquiry Details which will have workload specific details. + For e.g. - For SQL and oracle this will contain different details.", + SerializedName = @"inquiryDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryDetail { get; set; } + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Inquiry Status for this container such as + InProgress | Failed | Succeeded", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + + } + /// Details about inquired protectable items under a given container. + internal partial interface IInquiryInfoInternal + + { + /// Error Details if the Status is non-success. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail ErrorDetail { get; set; } + /// Error code. + string ErrorDetailCode { get; set; } + /// Error Message related to the Code. + string ErrorDetailMessage { get; set; } + /// List of recommendation strings. + string[] ErrorDetailRecommendation { get; set; } + /// + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails[] InquiryDetail { get; set; } + /// + /// Inquiry Status for this container such as + /// InProgress | Failed | Succeeded + /// + string Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryInfo.json.cs new file mode 100644 index 000000000000..c8ac09e9821e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryInfo.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Details about inquired protectable items under a given container. + public partial class InquiryInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new InquiryInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal InquiryInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorDetail = If( json?.PropertyT("errorDetail"), out var __jsonErrorDetail) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail.FromJson(__jsonErrorDetail) : ErrorDetail;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_inquiryDetail = If( json?.PropertyT("inquiryDetails"), out var __jsonInquiryDetails) ? If( __jsonInquiryDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadInquiryDetails.FromJson(__u) )) ))() : null : InquiryDetail;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._errorDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._errorDetail.ToJson(null,serializationMode) : null, "errorDetail" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + if (null != this._inquiryDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._inquiryDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("inquiryDetails",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryValidation.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryValidation.cs new file mode 100644 index 000000000000..7f2494e01868 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryValidation.cs @@ -0,0 +1,154 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Validation for inquired protectable items under a given container. + public partial class InquiryValidation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidation, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal + { + + /// Backing field for property. + private string _additionalDetail; + + /// Error Additional Detail in case the status is non-success. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AdditionalDetail { get => this._additionalDetail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail _errorDetail; + + /// Error Detail in case the status is non-success. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail()); set => this._errorDetail = value; } + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Code; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Message; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Recommendation; } + + /// Internal Acessors for AdditionalDetail + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal.AdditionalDetail { get => this._additionalDetail; set { {_additionalDetail = value;} } } + + /// Internal Acessors for ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal.ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail()); set { {_errorDetail = value;} } } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Code = value; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Message = value; } + + /// Internal Acessors for ErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal.ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Recommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetailInternal)ErrorDetail).Recommendation = value; } + + /// Internal Acessors for ProtectableItemCount + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal.ProtectableItemCount { get => (this._protectableItemCount = this._protectableItemCount ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Any()); set { {_protectableItemCount = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny _protectableItemCount; + + /// Dictionary to store the count of ProtectableItems with key POType. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny ProtectableItemCount { get => (this._protectableItemCount = this._protectableItemCount ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Any()); } + + /// Backing field for property. + private string _status; + + /// Status for the Inquiry Validation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public InquiryValidation() + { + + } + } + /// Validation for inquired protectable items under a given container. + public partial interface IInquiryValidation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error Additional Detail in case the status is non-success. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Additional Detail in case the status is non-success.", + SerializedName = @"additionalDetail", + PossibleTypes = new [] { typeof(string) })] + string AdditionalDetail { get; } + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; } + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Message related to the Code.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; } + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of recommendation strings.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] ErrorDetailRecommendation { get; } + /// Dictionary to store the count of ProtectableItems with key POType. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Dictionary to store the count of ProtectableItems with key POType.", + SerializedName = @"protectableItemCount", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny ProtectableItemCount { get; } + /// Status for the Inquiry Validation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status for the Inquiry Validation.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + + } + /// Validation for inquired protectable items under a given container. + internal partial interface IInquiryValidationInternal + + { + /// Error Additional Detail in case the status is non-success. + string AdditionalDetail { get; set; } + /// Error Detail in case the status is non-success. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail ErrorDetail { get; set; } + /// Error code. + string ErrorDetailCode { get; set; } + /// Error Message related to the Code. + string ErrorDetailMessage { get; set; } + /// List of recommendation strings. + string[] ErrorDetailRecommendation { get; set; } + /// Dictionary to store the count of ProtectableItems with key POType. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny ProtectableItemCount { get; set; } + /// Status for the Inquiry Validation. + string Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryValidation.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryValidation.json.cs new file mode 100644 index 000000000000..4be4db8f3284 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InquiryValidation.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Validation for inquired protectable items under a given container. + public partial class InquiryValidation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidation FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new InquiryValidation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal InquiryValidation(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorDetail = If( json?.PropertyT("errorDetail"), out var __jsonErrorDetail) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail.FromJson(__jsonErrorDetail) : ErrorDetail;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_additionalDetail = If( json?.PropertyT("additionalDetail"), out var __jsonAdditionalDetail) ? (string)__jsonAdditionalDetail : (string)AdditionalDetail;} + {_protectableItemCount = If( json?.PropertyT("protectableItemCount"), out var __jsonProtectableItemCount) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Any.FromJson(__jsonProtectableItemCount) : ProtectableItemCount;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._errorDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._errorDetail.ToJson(null,serializationMode) : null, "errorDetail" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._additionalDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._additionalDetail.ToString()) : null, "additionalDetail" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._protectableItemCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._protectableItemCount.ToJson(null,serializationMode) : null, "protectableItemCount" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantItemRecoveryTarget.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantItemRecoveryTarget.cs new file mode 100644 index 000000000000..e10d8358459b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantItemRecoveryTarget.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Target details for file / folder restore. + public partial class InstantItemRecoveryTarget : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTarget, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTargetInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect[] _clientScript; + + /// List of client scripts. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect[] ClientScript { get => this._clientScript; set => this._clientScript = value; } + + /// Creates an new instance. + public InstantItemRecoveryTarget() + { + + } + } + /// Target details for file / folder restore. + public partial interface IInstantItemRecoveryTarget : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of client scripts. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of client scripts.", + SerializedName = @"clientScripts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect[] ClientScript { get; set; } + + } + /// Target details for file / folder restore. + internal partial interface IInstantItemRecoveryTargetInternal + + { + /// List of client scripts. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect[] ClientScript { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantItemRecoveryTarget.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantItemRecoveryTarget.json.cs new file mode 100644 index 000000000000..a38f7f2a7dd7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantItemRecoveryTarget.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Target details for file / folder restore. + public partial class InstantItemRecoveryTarget + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTarget. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTarget. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTarget FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new InstantItemRecoveryTarget(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal InstantItemRecoveryTarget(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_clientScript = If( json?.PropertyT("clientScripts"), out var __jsonClientScripts) ? If( __jsonClientScripts as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientScriptForConnect.FromJson(__u) )) ))() : null : ClientScript;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._clientScript) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._clientScript ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("clientScripts",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantRpAdditionalDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantRpAdditionalDetails.cs new file mode 100644 index 000000000000..b61afdea628d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantRpAdditionalDetails.cs @@ -0,0 +1,61 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class InstantRpAdditionalDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetailsInternal + { + + /// Backing field for property. + private string _azureBackupRgNamePrefix; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AzureBackupRgNamePrefix { get => this._azureBackupRgNamePrefix; set => this._azureBackupRgNamePrefix = value; } + + /// Backing field for property. + private string _azureBackupRgNameSuffix; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AzureBackupRgNameSuffix { get => this._azureBackupRgNameSuffix; set => this._azureBackupRgNameSuffix = value; } + + /// Creates an new instance. + public InstantRpAdditionalDetails() + { + + } + } + public partial interface IInstantRpAdditionalDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"azureBackupRGNamePrefix", + PossibleTypes = new [] { typeof(string) })] + string AzureBackupRgNamePrefix { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"azureBackupRGNameSuffix", + PossibleTypes = new [] { typeof(string) })] + string AzureBackupRgNameSuffix { get; set; } + + } + internal partial interface IInstantRpAdditionalDetailsInternal + + { + string AzureBackupRgNamePrefix { get; set; } + + string AzureBackupRgNameSuffix { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantRpAdditionalDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantRpAdditionalDetails.json.cs new file mode 100644 index 000000000000..051ed7fa718b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/InstantRpAdditionalDetails.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class InstantRpAdditionalDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantRpAdditionalDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new InstantRpAdditionalDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal InstantRpAdditionalDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_azureBackupRgNamePrefix = If( json?.PropertyT("azureBackupRGNamePrefix"), out var __jsonAzureBackupRgNamePrefix) ? (string)__jsonAzureBackupRgNamePrefix : (string)AzureBackupRgNamePrefix;} + {_azureBackupRgNameSuffix = If( json?.PropertyT("azureBackupRGNameSuffix"), out var __jsonAzureBackupRgNameSuffix) ? (string)__jsonAzureBackupRgNameSuffix : (string)AzureBackupRgNameSuffix;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._azureBackupRgNamePrefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._azureBackupRgNamePrefix.ToString()) : null, "azureBackupRGNamePrefix" ,container.Add ); + AddIf( null != (((object)this._azureBackupRgNameSuffix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._azureBackupRgNameSuffix.ToString()) : null, "azureBackupRGNameSuffix" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Job.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Job.cs new file mode 100644 index 000000000000..4886016e3c67 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Job.cs @@ -0,0 +1,176 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Defines workload agnostic properties for a job. + public partial class Job : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal + { + + /// Backing field for property. + private string _activityId; + + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ActivityId { get => this._activityId; set => this._activityId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private string _entityFriendlyName; + + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string EntityFriendlyName { get => this._entityFriendlyName; set => this._entityFriendlyName = value; } + + /// Backing field for property. + private string _operation; + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Operation { get => this._operation; set => this._operation = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private string _status; + + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private string _type; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public Job() + { + + } + } + /// Defines workload agnostic properties for a job. + public partial interface IJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ActivityId of job.", + SerializedName = @"activityId", + PossibleTypes = new [] { typeof(string) })] + string ActivityId { get; set; } + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type to execute the current job.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the entity on which the current job is executing.", + SerializedName = @"entityFriendlyName", + PossibleTypes = new [] { typeof(string) })] + string EntityFriendlyName { get; set; } + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operation name.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; set; } + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"jobType", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// Defines workload agnostic properties for a job. + internal partial interface IJobInternal + + { + /// ActivityId of job. + string ActivityId { get; set; } + /// Backup management type to execute the current job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// The end time. + global::System.DateTime? EndTime { get; set; } + /// Friendly name of the entity on which the current job is executing. + string EntityFriendlyName { get; set; } + /// The operation name. + string Operation { get; set; } + /// The start time. + global::System.DateTime? StartTime { get; set; } + /// Job status. + string Status { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Job.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Job.json.cs new file mode 100644 index 000000000000..a1c431be7120 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Job.json.cs @@ -0,0 +1,161 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Defines workload agnostic properties for a job. + public partial class Job + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("jobType") ) + { + case "AzureIaaSVMJob": + { + return new AzureIaaSvmJob(json); + } + case "AzureIaaSVMJobV2": + { + return new AzureIaaSvmJobV2(json); + } + case "AzureStorageJob": + { + return new AzureStorageJob(json); + } + case "AzureWorkloadJob": + { + return new AzureWorkloadJob(json); + } + case "DpmJob": + { + return new DpmJob(json); + } + case "MabJob": + { + return new MabJob(json); + } + case "VaultJob": + { + return new VaultJob(json); + } + } + return new Job(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal Job(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_entityFriendlyName = If( json?.PropertyT("entityFriendlyName"), out var __jsonEntityFriendlyName) ? (string)__jsonEntityFriendlyName : (string)EntityFriendlyName;} + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_activityId = If( json?.PropertyT("activityId"), out var __jsonActivityId) ? (string)__jsonActivityId : (string)ActivityId;} + {_type = If( json?.PropertyT("jobType"), out var __jsonJobType) ? (string)__jsonJobType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._entityFriendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._entityFriendlyName.ToString()) : null, "entityFriendlyName" ,container.Add ); + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AddIf( null != (((object)this._activityId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._activityId.ToString()) : null, "activityId" ,container.Add ); + 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, "jobType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobQueryObject.cs new file mode 100644 index 000000000000..7d2d1f19ba48 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobQueryObject.cs @@ -0,0 +1,136 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list the jobs. + public partial class JobQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobQueryObjectInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Type of backup management for the job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// Job has ended at this time. Value is in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private string _jobId; + + /// JobID represents the job uniquely. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string JobId { get => this._jobId; set => this._jobId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType? _operation; + + /// Type of operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType? Operation { get => this._operation; set => this._operation = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Job has started at this time. Value is in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus? _status; + + /// Status of the job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public JobQueryObject() + { + + } + } + /// Filters to list the jobs. + public partial interface IJobQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Type of backup management for the job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management for the job.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Job has ended at this time. Value is in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job has ended at this time. Value is in UTC.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// JobID represents the job uniquely. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"JobID represents the job uniquely.", + SerializedName = @"jobId", + PossibleTypes = new [] { typeof(string) })] + string JobId { get; set; } + /// Type of operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of operation.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType? Operation { get; set; } + /// Job has started at this time. Value is in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job has started at this time. Value is in UTC.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// Status of the job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the job.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus? Status { get; set; } + + } + /// Filters to list the jobs. + internal partial interface IJobQueryObjectInternal + + { + /// Type of backup management for the job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Job has ended at this time. Value is in UTC. + global::System.DateTime? EndTime { get; set; } + /// JobID represents the job uniquely. + string JobId { get; set; } + /// Type of operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType? Operation { get; set; } + /// Job has started at this time. Value is in UTC. + global::System.DateTime? StartTime { get; set; } + /// Status of the job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobQueryObject.json.cs new file mode 100644 index 000000000000..14eadbf32f50 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobQueryObject.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list the jobs. + public partial class JobQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new JobQueryObject(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal JobQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + {_jobId = If( json?.PropertyT("jobId"), out var __jsonJobId) ? (string)__jsonJobId : (string)JobId;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + AddIf( null != (((object)this._jobId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._jobId.ToString()) : null, "jobId" ,container.Add ); + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResource.cs new file mode 100644 index 000000000000..ff52d68979cf --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResource.cs @@ -0,0 +1,218 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Defines workload agnostic properties for a job. + public partial class JobResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ActivityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).ActivityId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).ActivityId = value ?? null; } + + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).EndTime = value ?? default(global::System.DateTime); } + + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string EntityFriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).EntityFriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).EntityFriendlyName = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string JobType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).Type = value ?? null; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).Operation = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob _property; + + /// JobResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job()); set => this._property = value; } + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).StartTime = value ?? default(global::System.DateTime); } + + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)Property).Status = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public JobResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Defines workload agnostic properties for a job. + public partial interface IJobResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ActivityId of job.", + SerializedName = @"activityId", + PossibleTypes = new [] { typeof(string) })] + string ActivityId { get; set; } + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type to execute the current job.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the entity on which the current job is executing.", + SerializedName = @"entityFriendlyName", + PossibleTypes = new [] { typeof(string) })] + string EntityFriendlyName { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"jobType", + PossibleTypes = new [] { typeof(string) })] + string JobType { get; set; } + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operation name.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; set; } + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + + } + /// Defines workload agnostic properties for a job. + internal partial interface IJobResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// ActivityId of job. + string ActivityId { get; set; } + /// Backup management type to execute the current job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// The end time. + global::System.DateTime? EndTime { get; set; } + /// Friendly name of the entity on which the current job is executing. + string EntityFriendlyName { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string JobType { get; set; } + /// The operation name. + string Operation { get; set; } + /// JobResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob Property { get; set; } + /// The start time. + global::System.DateTime? StartTime { get; set; } + /// Job status. + string Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResource.json.cs new file mode 100644 index 000000000000..7830274bd74a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Defines workload agnostic properties for a job. + public partial class JobResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new JobResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal JobResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResourceList.cs new file mode 100644 index 000000000000..9ee6ecfe9925 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of Job resources + public partial class JobResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public JobResourceList() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + } + /// List of Job resources + public partial interface IJobResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource[] Value { get; set; } + + } + /// List of Job resources + internal partial interface IJobResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResourceList.json.cs new file mode 100644 index 000000000000..7cb35e7cb028 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/JobResourceList.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of Job resources + public partial class JobResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new JobResourceList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal JobResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.JobResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KekDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KekDetails.cs new file mode 100644 index 000000000000..4cca4453c44c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KekDetails.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// KEK is encryption key for BEK. + public partial class KekDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetailsInternal + { + + /// Backing field for property. + private string _keyBackupData; + + /// KEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string KeyBackupData { get => this._keyBackupData; set => this._keyBackupData = value; } + + /// Backing field for property. + private string _keyUrl; + + /// Key is KEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string KeyUrl { get => this._keyUrl; set => this._keyUrl = value; } + + /// Backing field for property. + private string _keyVaultId; + + /// Key Vault ID where this Key is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string KeyVaultId { get => this._keyVaultId; set => this._keyVaultId = value; } + + /// Creates an new instance. + public KekDetails() + { + + } + } + /// KEK is encryption key for BEK. + public partial interface IKekDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// KEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"KEK data.", + SerializedName = @"keyBackupData", + PossibleTypes = new [] { typeof(string) })] + string KeyBackupData { get; set; } + /// Key is KEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key is KEK.", + SerializedName = @"keyUrl", + PossibleTypes = new [] { typeof(string) })] + string KeyUrl { get; set; } + /// Key Vault ID where this Key is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Vault ID where this Key is stored.", + SerializedName = @"keyVaultId", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultId { get; set; } + + } + /// KEK is encryption key for BEK. + internal partial interface IKekDetailsInternal + + { + /// KEK data. + string KeyBackupData { get; set; } + /// Key is KEK. + string KeyUrl { get; set; } + /// Key Vault ID where this Key is stored. + string KeyVaultId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KekDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KekDetails.json.cs new file mode 100644 index 000000000000..879d680a14d6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KekDetails.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// KEK is encryption key for BEK. + public partial class KekDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new KekDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal KekDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_keyUrl = If( json?.PropertyT("keyUrl"), out var __jsonKeyUrl) ? (string)__jsonKeyUrl : (string)KeyUrl;} + {_keyVaultId = If( json?.PropertyT("keyVaultId"), out var __jsonKeyVaultId) ? (string)__jsonKeyVaultId : (string)KeyVaultId;} + {_keyBackupData = If( json?.PropertyT("keyBackupData"), out var __jsonKeyBackupData) ? (string)__jsonKeyBackupData : (string)KeyBackupData;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._keyUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._keyUrl.ToString()) : null, "keyUrl" ,container.Add ); + AddIf( null != (((object)this._keyVaultId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._keyVaultId.ToString()) : null, "keyVaultId" ,container.Add ); + AddIf( null != (((object)this._keyBackupData)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._keyBackupData.ToString()) : null, "keyBackupData" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KeyAndSecretDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KeyAndSecretDetails.cs new file mode 100644 index 000000000000..82eaae051433 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KeyAndSecretDetails.cs @@ -0,0 +1,179 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// BEK is bitlocker key. + /// KEK is encryption key for BEK + /// If the VM was encrypted then we will store following details : + /// 1. Secret(BEK) - Url + Backup Data + vaultId. + /// 2. Key(KEK) - Url + Backup Data + vaultId. + /// 3. EncryptionMechanism + /// BEK and KEK can potentially have different vault ids. + /// + public partial class KeyAndSecretDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails _bekDetail; + + /// BEK is bitlocker encryption key. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails BekDetail { get => (this._bekDetail = this._bekDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BekDetails()); set => this._bekDetail = value; } + + /// BEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BekDetailSecretData { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetailsInternal)BekDetail).SecretData; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetailsInternal)BekDetail).SecretData = value ?? null; } + + /// Secret is BEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BekDetailSecretUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetailsInternal)BekDetail).SecretUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetailsInternal)BekDetail).SecretUrl = value ?? null; } + + /// ID of the Key Vault where this Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BekDetailSecretVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetailsInternal)BekDetail).SecretVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetailsInternal)BekDetail).SecretVaultId = value ?? null; } + + /// Backing field for property. + private string _encryptionMechanism; + + /// Encryption mechanism: None/ SinglePass/ DoublePass + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string EncryptionMechanism { get => this._encryptionMechanism; set => this._encryptionMechanism = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails _kekDetail; + + /// KEK is encryption key for BEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails KekDetail { get => (this._kekDetail = this._kekDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.KekDetails()); set => this._kekDetail = value; } + + /// KEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string KekDetailKeyBackupData { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetailsInternal)KekDetail).KeyBackupData; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetailsInternal)KekDetail).KeyBackupData = value ?? null; } + + /// Key is KEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string KekDetailKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetailsInternal)KekDetail).KeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetailsInternal)KekDetail).KeyUrl = value ?? null; } + + /// Key Vault ID where this Key is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string KekDetailKeyVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetailsInternal)KekDetail).KeyVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetailsInternal)KekDetail).KeyVaultId = value ?? null; } + + /// Internal Acessors for BekDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal.BekDetail { get => (this._bekDetail = this._bekDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BekDetails()); set { {_bekDetail = value;} } } + + /// Internal Acessors for KekDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetailsInternal.KekDetail { get => (this._kekDetail = this._kekDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.KekDetails()); set { {_kekDetail = value;} } } + + /// Creates an new instance. + public KeyAndSecretDetails() + { + + } + } + /// BEK is bitlocker key. + /// KEK is encryption key for BEK + /// If the VM was encrypted then we will store following details : + /// 1. Secret(BEK) - Url + Backup Data + vaultId. + /// 2. Key(KEK) - Url + Backup Data + vaultId. + /// 3. EncryptionMechanism + /// BEK and KEK can potentially have different vault ids. + public partial interface IKeyAndSecretDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// BEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"BEK data.", + SerializedName = @"secretData", + PossibleTypes = new [] { typeof(string) })] + string BekDetailSecretData { get; set; } + /// Secret is BEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Secret is BEK.", + SerializedName = @"secretUrl", + PossibleTypes = new [] { typeof(string) })] + string BekDetailSecretUrl { get; set; } + /// ID of the Key Vault where this Secret is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the Key Vault where this Secret is stored.", + SerializedName = @"secretVaultId", + PossibleTypes = new [] { typeof(string) })] + string BekDetailSecretVaultId { get; set; } + /// Encryption mechanism: None/ SinglePass/ DoublePass + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Encryption mechanism: None/ SinglePass/ DoublePass", + SerializedName = @"encryptionMechanism", + PossibleTypes = new [] { typeof(string) })] + string EncryptionMechanism { get; set; } + /// KEK data. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"KEK data.", + SerializedName = @"keyBackupData", + PossibleTypes = new [] { typeof(string) })] + string KekDetailKeyBackupData { get; set; } + /// Key is KEK. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key is KEK.", + SerializedName = @"keyUrl", + PossibleTypes = new [] { typeof(string) })] + string KekDetailKeyUrl { get; set; } + /// Key Vault ID where this Key is stored. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key Vault ID where this Key is stored.", + SerializedName = @"keyVaultId", + PossibleTypes = new [] { typeof(string) })] + string KekDetailKeyVaultId { get; set; } + + } + /// BEK is bitlocker key. + /// KEK is encryption key for BEK + /// If the VM was encrypted then we will store following details : + /// 1. Secret(BEK) - Url + Backup Data + vaultId. + /// 2. Key(KEK) - Url + Backup Data + vaultId. + /// 3. EncryptionMechanism + /// BEK and KEK can potentially have different vault ids. + internal partial interface IKeyAndSecretDetailsInternal + + { + /// BEK is bitlocker encryption key. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBekDetails BekDetail { get; set; } + /// BEK data. + string BekDetailSecretData { get; set; } + /// Secret is BEK. + string BekDetailSecretUrl { get; set; } + /// ID of the Key Vault where this Secret is stored. + string BekDetailSecretVaultId { get; set; } + /// Encryption mechanism: None/ SinglePass/ DoublePass + string EncryptionMechanism { get; set; } + /// KEK is encryption key for BEK. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKekDetails KekDetail { get; set; } + /// KEK data. + string KekDetailKeyBackupData { get; set; } + /// Key is KEK. + string KekDetailKeyUrl { get; set; } + /// Key Vault ID where this Key is stored. + string KekDetailKeyVaultId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KeyAndSecretDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KeyAndSecretDetails.json.cs new file mode 100644 index 000000000000..a935c9456284 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KeyAndSecretDetails.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// BEK is bitlocker key. + /// KEK is encryption key for BEK + /// If the VM was encrypted then we will store following details : + /// 1. Secret(BEK) - Url + Backup Data + vaultId. + /// 2. Key(KEK) - Url + Backup Data + vaultId. + /// 3. EncryptionMechanism + /// BEK and KEK can potentially have different vault ids. + /// + public partial class KeyAndSecretDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKeyAndSecretDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new KeyAndSecretDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal KeyAndSecretDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_kekDetail = If( json?.PropertyT("kekDetails"), out var __jsonKekDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.KekDetails.FromJson(__jsonKekDetails) : KekDetail;} + {_bekDetail = If( json?.PropertyT("bekDetails"), out var __jsonBekDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BekDetails.FromJson(__jsonBekDetails) : BekDetail;} + {_encryptionMechanism = If( json?.PropertyT("encryptionMechanism"), out var __jsonEncryptionMechanism) ? (string)__jsonEncryptionMechanism : (string)EncryptionMechanism;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._kekDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._kekDetail.ToJson(null,serializationMode) : null, "kekDetails" ,container.Add ); + AddIf( null != this._bekDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._bekDetail.ToJson(null,serializationMode) : null, "bekDetails" ,container.Add ); + AddIf( null != (((object)this._encryptionMechanism)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._encryptionMechanism.ToString()) : null, "encryptionMechanism" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KpiResourceHealthDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KpiResourceHealthDetails.cs new file mode 100644 index 000000000000..5b7537d4a3b7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KpiResourceHealthDetails.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// KPI Resource Health Details + public partial class KpiResourceHealthDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetailsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] _resourceHealthDetail; + + /// Resource Health Status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] ResourceHealthDetail { get => this._resourceHealthDetail; set => this._resourceHealthDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus? _resourceHealthStatus; + + /// Resource Health Status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus? ResourceHealthStatus { get => this._resourceHealthStatus; set => this._resourceHealthStatus = value; } + + /// Creates an new instance. + public KpiResourceHealthDetails() + { + + } + } + /// KPI Resource Health Details + public partial interface IKpiResourceHealthDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Resource Health Status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource Health Status", + SerializedName = @"resourceHealthDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] ResourceHealthDetail { get; set; } + /// Resource Health Status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource Health Status", + SerializedName = @"resourceHealthStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus? ResourceHealthStatus { get; set; } + + } + /// KPI Resource Health Details + internal partial interface IKpiResourceHealthDetailsInternal + + { + /// Resource Health Status + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails[] ResourceHealthDetail { get; set; } + /// Resource Health Status + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus? ResourceHealthStatus { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KpiResourceHealthDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KpiResourceHealthDetails.json.cs new file mode 100644 index 000000000000..655e9b5f067c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/KpiResourceHealthDetails.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// KPI Resource Health Details + public partial class KpiResourceHealthDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IKpiResourceHealthDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new KpiResourceHealthDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal KpiResourceHealthDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceHealthStatus = If( json?.PropertyT("resourceHealthStatus"), out var __jsonResourceHealthStatus) ? (string)__jsonResourceHealthStatus : (string)ResourceHealthStatus;} + {_resourceHealthDetail = If( json?.PropertyT("resourceHealthDetails"), out var __jsonResourceHealthDetails) ? If( __jsonResourceHealthDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceHealthDetails.FromJson(__u) )) ))() : null : ResourceHealthDetail;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._resourceHealthStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceHealthStatus.ToString()) : null, "resourceHealthStatus" ,container.Add ); + if (null != this._resourceHealthDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourceHealthDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("resourceHealthDetails",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ListRecoveryPointsRecommendedForMoveRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ListRecoveryPointsRecommendedForMoveRequest.cs new file mode 100644 index 000000000000..de3d75805152 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ListRecoveryPointsRecommendedForMoveRequest.cs @@ -0,0 +1,70 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// ListRecoveryPointsRecommendedForMoveRequest Request + public partial class ListRecoveryPointsRecommendedForMoveRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IListRecoveryPointsRecommendedForMoveRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IListRecoveryPointsRecommendedForMoveRequestInternal + { + + /// Backing field for property. + private string[] _excludedRpList; + + /// List of Recovery Points excluded from Move + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] ExcludedRpList { get => this._excludedRpList; set => this._excludedRpList = value; } + + /// Backing field for property. + private string _objectType; + + /// Gets the class type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// + /// Creates an new instance. + /// + public ListRecoveryPointsRecommendedForMoveRequest() + { + + } + } + /// ListRecoveryPointsRecommendedForMoveRequest Request + public partial interface IListRecoveryPointsRecommendedForMoveRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of Recovery Points excluded from Move + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of Recovery Points excluded from Move", + SerializedName = @"excludedRPList", + PossibleTypes = new [] { typeof(string) })] + string[] ExcludedRpList { get; set; } + /// Gets the class type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the class type.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// ListRecoveryPointsRecommendedForMoveRequest Request + internal partial interface IListRecoveryPointsRecommendedForMoveRequestInternal + + { + /// List of Recovery Points excluded from Move + string[] ExcludedRpList { get; set; } + /// Gets the class type. + string ObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ListRecoveryPointsRecommendedForMoveRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ListRecoveryPointsRecommendedForMoveRequest.json.cs new file mode 100644 index 000000000000..a2b0e8c312c4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ListRecoveryPointsRecommendedForMoveRequest.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// ListRecoveryPointsRecommendedForMoveRequest Request + public partial class ListRecoveryPointsRecommendedForMoveRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IListRecoveryPointsRecommendedForMoveRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IListRecoveryPointsRecommendedForMoveRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IListRecoveryPointsRecommendedForMoveRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ListRecoveryPointsRecommendedForMoveRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ListRecoveryPointsRecommendedForMoveRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + {_excludedRpList = If( json?.PropertyT("excludedRPList"), out var __jsonExcludedRpList) ? If( __jsonExcludedRpList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ExcludedRpList;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + if (null != this._excludedRpList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._excludedRpList ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("excludedRPList",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LogSchedulePolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LogSchedulePolicy.cs new file mode 100644 index 000000000000..32d7a8094e7d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LogSchedulePolicy.cs @@ -0,0 +1,76 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Log policy schedule. + public partial class LogSchedulePolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILogSchedulePolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILogSchedulePolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy __schedulePolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy(); + + /// Backing field for property. + private int? _scheduleFrequencyInMin; + + /// Frequency of the log schedule operation of this policy in minutes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ScheduleFrequencyInMin { get => this._scheduleFrequencyInMin; set => this._scheduleFrequencyInMin = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)__schedulePolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)__schedulePolicy).Type = value ; } + + /// Creates an new instance. + public LogSchedulePolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__schedulePolicy), __schedulePolicy); + await eventListener.AssertObjectIsValid(nameof(__schedulePolicy), __schedulePolicy); + } + } + /// Log policy schedule. + public partial interface ILogSchedulePolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy + { + /// Frequency of the log schedule operation of this policy in minutes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Frequency of the log schedule operation of this policy in minutes.", + SerializedName = @"scheduleFrequencyInMins", + PossibleTypes = new [] { typeof(int) })] + int? ScheduleFrequencyInMin { get; set; } + + } + /// Log policy schedule. + internal partial interface ILogSchedulePolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal + { + /// Frequency of the log schedule operation of this policy in minutes. + int? ScheduleFrequencyInMin { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LogSchedulePolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LogSchedulePolicy.json.cs new file mode 100644 index 000000000000..ee9913fd822e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LogSchedulePolicy.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Log policy schedule. + public partial class LogSchedulePolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILogSchedulePolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILogSchedulePolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILogSchedulePolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new LogSchedulePolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal LogSchedulePolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __schedulePolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy(json); + {_scheduleFrequencyInMin = If( json?.PropertyT("scheduleFrequencyInMins"), out var __jsonScheduleFrequencyInMins) ? (int?)__jsonScheduleFrequencyInMins : ScheduleFrequencyInMin;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __schedulePolicy?.ToJson(container, serializationMode); + AddIf( null != this._scheduleFrequencyInMin ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._scheduleFrequencyInMin) : null, "scheduleFrequencyInMins" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermRetentionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermRetentionPolicy.cs new file mode 100644 index 000000000000..f3a093221a0e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermRetentionPolicy.cs @@ -0,0 +1,495 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Long term retention policy. + public partial class LongTermRetentionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy __retentionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionSchedule _dailySchedule; + + /// Daily retention schedule of the protection policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionSchedule DailySchedule { get => (this._dailySchedule = this._dailySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailyRetentionSchedule()); set => this._dailySchedule = value; } + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? DailyScheduleRetentionDurationCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal)DailySchedule).RetentionDurationCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal)DailySchedule).RetentionDurationCount = value ?? default(int); } + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? DailyScheduleRetentionDurationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal)DailySchedule).RetentionDurationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal)DailySchedule).RetentionDurationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType)""); } + + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime[] DailyScheduleRetentionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal)DailySchedule).RetentionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal)DailySchedule).RetentionTime = value ?? null /* arrayOf */; } + + /// Internal Acessors for DailySchedule + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionSchedule Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.DailySchedule { get => (this._dailySchedule = this._dailySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailyRetentionSchedule()); set { {_dailySchedule = value;} } } + + /// Internal Acessors for DailyScheduleRetentionDuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.DailyScheduleRetentionDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal)DailySchedule).RetentionDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionScheduleInternal)DailySchedule).RetentionDuration = value; } + + /// Internal Acessors for MonthlySchedule + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionSchedule Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.MonthlySchedule { get => (this._monthlySchedule = this._monthlySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MonthlyRetentionSchedule()); set { {_monthlySchedule = value;} } } + + /// Internal Acessors for MonthlyScheduleRetentionDuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.MonthlyScheduleRetentionDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionDuration = value; } + + /// Internal Acessors for MonthlyScheduleRetentionScheduleDaily + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.MonthlyScheduleRetentionScheduleDaily { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleDaily; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleDaily = value; } + + /// Internal Acessors for MonthlyScheduleRetentionScheduleWeekly + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.MonthlyScheduleRetentionScheduleWeekly { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleWeekly; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleWeekly = value; } + + /// Internal Acessors for WeeklySchedule + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionSchedule Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.WeeklySchedule { get => (this._weeklySchedule = this._weeklySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklyRetentionSchedule()); set { {_weeklySchedule = value;} } } + + /// Internal Acessors for WeeklyScheduleRetentionDuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.WeeklyScheduleRetentionDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).RetentionDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).RetentionDuration = value; } + + /// Internal Acessors for YearlySchedule + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionSchedule Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.YearlySchedule { get => (this._yearlySchedule = this._yearlySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.YearlyRetentionSchedule()); set { {_yearlySchedule = value;} } } + + /// Internal Acessors for YearlyScheduleRetentionDuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.YearlyScheduleRetentionDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionDuration = value; } + + /// Internal Acessors for YearlyScheduleRetentionScheduleDaily + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.YearlyScheduleRetentionScheduleDaily { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleDaily; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleDaily = value; } + + /// Internal Acessors for YearlyScheduleRetentionScheduleWeekly + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicyInternal.YearlyScheduleRetentionScheduleWeekly { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleWeekly; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleWeekly = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionSchedule _monthlySchedule; + + /// Monthly retention schedule of the protection policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionSchedule MonthlySchedule { get => (this._monthlySchedule = this._monthlySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MonthlyRetentionSchedule()); set => this._monthlySchedule = value; } + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? MonthlyScheduleRetentionDurationCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionDurationCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionDurationCount = value ?? default(int); } + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? MonthlyScheduleRetentionDurationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionDurationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionDurationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType)""); } + + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] MonthlyScheduleRetentionScheduleDailyDaysOfTheMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleDailyDaysOfTheMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleDailyDaysOfTheMonth = value ?? null /* arrayOf */; } + + /// Retention schedule format type for monthly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? MonthlyScheduleRetentionScheduleFormatType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleFormatType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleFormatType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat)""); } + + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] MonthlyScheduleRetentionScheduleWeeklyDaysOfTheWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleWeeklyDaysOfTheWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleWeeklyDaysOfTheWeek = value ?? null /* arrayOf */; } + + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] MonthlyScheduleRetentionScheduleWeeklyWeeksOfTheMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleWeeklyWeeksOfTheMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionScheduleWeeklyWeeksOfTheMonth = value ?? null /* arrayOf */; } + + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime[] MonthlyScheduleRetentionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal)MonthlySchedule).RetentionTime = value ?? null /* arrayOf */; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)__retentionPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)__retentionPolicy).Type = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionSchedule _weeklySchedule; + + /// Weekly retention schedule of the protection policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionSchedule WeeklySchedule { get => (this._weeklySchedule = this._weeklySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklyRetentionSchedule()); set => this._weeklySchedule = value; } + + /// List of days of week for weekly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] WeeklyScheduleDaysOfTheWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).DaysOfTheWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).DaysOfTheWeek = value ?? null /* arrayOf */; } + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? WeeklyScheduleRetentionDurationCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).RetentionDurationCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).RetentionDurationCount = value ?? default(int); } + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? WeeklyScheduleRetentionDurationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).RetentionDurationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).RetentionDurationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType)""); } + + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime[] WeeklyScheduleRetentionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).RetentionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal)WeeklySchedule).RetentionTime = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionSchedule _yearlySchedule; + + /// Yearly retention schedule of the protection policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionSchedule YearlySchedule { get => (this._yearlySchedule = this._yearlySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.YearlyRetentionSchedule()); set => this._yearlySchedule = value; } + + /// List of months of year of yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear[] YearlyScheduleMonthsOfYear { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).MonthsOfYear; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).MonthsOfYear = value ?? null /* arrayOf */; } + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? YearlyScheduleRetentionDurationCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionDurationCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionDurationCount = value ?? default(int); } + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? YearlyScheduleRetentionDurationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionDurationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionDurationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType)""); } + + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] YearlyScheduleRetentionScheduleDailyDaysOfTheMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleDailyDaysOfTheMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleDailyDaysOfTheMonth = value ?? null /* arrayOf */; } + + /// Retention schedule format for yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? YearlyScheduleRetentionScheduleFormatType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleFormatType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleFormatType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat)""); } + + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] YearlyScheduleRetentionScheduleWeeklyDaysOfTheWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleWeeklyDaysOfTheWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleWeeklyDaysOfTheWeek = value ?? null /* arrayOf */; } + + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] YearlyScheduleRetentionScheduleWeeklyWeeksOfTheMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleWeeklyWeeksOfTheMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionScheduleWeeklyWeeksOfTheMonth = value ?? null /* arrayOf */; } + + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime[] YearlyScheduleRetentionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal)YearlySchedule).RetentionTime = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public LongTermRetentionPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__retentionPolicy), __retentionPolicy); + await eventListener.AssertObjectIsValid(nameof(__retentionPolicy), __retentionPolicy); + } + } + /// Long term retention policy. + public partial interface ILongTermRetentionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy + { + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? DailyScheduleRetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? DailyScheduleRetentionDurationType { get; set; } + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention times of retention policy.", + SerializedName = @"retentionTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] DailyScheduleRetentionTime { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? MonthlyScheduleRetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? MonthlyScheduleRetentionDurationType { get; set; } + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the month.", + SerializedName = @"daysOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] MonthlyScheduleRetentionScheduleDailyDaysOfTheMonth { get; set; } + /// Retention schedule format type for monthly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention schedule format type for monthly retention policy.", + SerializedName = @"retentionScheduleFormatType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? MonthlyScheduleRetentionScheduleFormatType { get; set; } + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the week.", + SerializedName = @"daysOfTheWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] MonthlyScheduleRetentionScheduleWeeklyDaysOfTheWeek { get; set; } + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of weeks of month.", + SerializedName = @"weeksOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] MonthlyScheduleRetentionScheduleWeeklyWeeksOfTheMonth { get; set; } + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention times of retention policy.", + SerializedName = @"retentionTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] MonthlyScheduleRetentionTime { get; set; } + /// List of days of week for weekly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of week for weekly retention policy.", + SerializedName = @"daysOfTheWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] WeeklyScheduleDaysOfTheWeek { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? WeeklyScheduleRetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? WeeklyScheduleRetentionDurationType { get; set; } + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention times of retention policy.", + SerializedName = @"retentionTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] WeeklyScheduleRetentionTime { get; set; } + /// List of months of year of yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of months of year of yearly retention policy.", + SerializedName = @"monthsOfYear", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear[] YearlyScheduleMonthsOfYear { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? YearlyScheduleRetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? YearlyScheduleRetentionDurationType { get; set; } + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the month.", + SerializedName = @"daysOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] YearlyScheduleRetentionScheduleDailyDaysOfTheMonth { get; set; } + /// Retention schedule format for yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention schedule format for yearly retention policy.", + SerializedName = @"retentionScheduleFormatType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? YearlyScheduleRetentionScheduleFormatType { get; set; } + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the week.", + SerializedName = @"daysOfTheWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] YearlyScheduleRetentionScheduleWeeklyDaysOfTheWeek { get; set; } + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of weeks of month.", + SerializedName = @"weeksOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] YearlyScheduleRetentionScheduleWeeklyWeeksOfTheMonth { get; set; } + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention times of retention policy.", + SerializedName = @"retentionTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] YearlyScheduleRetentionTime { get; set; } + + } + /// Long term retention policy. + internal partial interface ILongTermRetentionPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal + { + /// Daily retention schedule of the protection policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionSchedule DailySchedule { get; set; } + /// Retention duration of retention Policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration DailyScheduleRetentionDuration { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? DailyScheduleRetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? DailyScheduleRetentionDurationType { get; set; } + /// Retention times of retention policy. + global::System.DateTime[] DailyScheduleRetentionTime { get; set; } + /// Monthly retention schedule of the protection policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionSchedule MonthlySchedule { get; set; } + /// Retention duration of retention Policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration MonthlyScheduleRetentionDuration { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? MonthlyScheduleRetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? MonthlyScheduleRetentionDurationType { get; set; } + /// Daily retention format for monthly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat MonthlyScheduleRetentionScheduleDaily { get; set; } + /// List of days of the month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] MonthlyScheduleRetentionScheduleDailyDaysOfTheMonth { get; set; } + /// Retention schedule format type for monthly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? MonthlyScheduleRetentionScheduleFormatType { get; set; } + /// Weekly retention format for monthly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat MonthlyScheduleRetentionScheduleWeekly { get; set; } + /// List of days of the week. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] MonthlyScheduleRetentionScheduleWeeklyDaysOfTheWeek { get; set; } + /// List of weeks of month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] MonthlyScheduleRetentionScheduleWeeklyWeeksOfTheMonth { get; set; } + /// Retention times of retention policy. + global::System.DateTime[] MonthlyScheduleRetentionTime { get; set; } + /// Weekly retention schedule of the protection policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionSchedule WeeklySchedule { get; set; } + /// List of days of week for weekly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] WeeklyScheduleDaysOfTheWeek { get; set; } + /// Retention duration of retention Policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration WeeklyScheduleRetentionDuration { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? WeeklyScheduleRetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? WeeklyScheduleRetentionDurationType { get; set; } + /// Retention times of retention policy. + global::System.DateTime[] WeeklyScheduleRetentionTime { get; set; } + /// Yearly retention schedule of the protection policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionSchedule YearlySchedule { get; set; } + /// List of months of year of yearly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear[] YearlyScheduleMonthsOfYear { get; set; } + /// Retention duration of retention Policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration YearlyScheduleRetentionDuration { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? YearlyScheduleRetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? YearlyScheduleRetentionDurationType { get; set; } + /// Daily retention format for yearly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat YearlyScheduleRetentionScheduleDaily { get; set; } + /// List of days of the month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] YearlyScheduleRetentionScheduleDailyDaysOfTheMonth { get; set; } + /// Retention schedule format for yearly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? YearlyScheduleRetentionScheduleFormatType { get; set; } + /// Weekly retention format for yearly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat YearlyScheduleRetentionScheduleWeekly { get; set; } + /// List of days of the week. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] YearlyScheduleRetentionScheduleWeeklyDaysOfTheWeek { get; set; } + /// List of weeks of month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] YearlyScheduleRetentionScheduleWeeklyWeeksOfTheMonth { get; set; } + /// Retention times of retention policy. + global::System.DateTime[] YearlyScheduleRetentionTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermRetentionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermRetentionPolicy.json.cs new file mode 100644 index 000000000000..6aa799ed3ff9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermRetentionPolicy.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Long term retention policy. + public partial class LongTermRetentionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermRetentionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new LongTermRetentionPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal LongTermRetentionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __retentionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy(json); + {_dailySchedule = If( json?.PropertyT("dailySchedule"), out var __jsonDailySchedule) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailyRetentionSchedule.FromJson(__jsonDailySchedule) : DailySchedule;} + {_weeklySchedule = If( json?.PropertyT("weeklySchedule"), out var __jsonWeeklySchedule) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklyRetentionSchedule.FromJson(__jsonWeeklySchedule) : WeeklySchedule;} + {_monthlySchedule = If( json?.PropertyT("monthlySchedule"), out var __jsonMonthlySchedule) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MonthlyRetentionSchedule.FromJson(__jsonMonthlySchedule) : MonthlySchedule;} + {_yearlySchedule = If( json?.PropertyT("yearlySchedule"), out var __jsonYearlySchedule) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.YearlyRetentionSchedule.FromJson(__jsonYearlySchedule) : YearlySchedule;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __retentionPolicy?.ToJson(container, serializationMode); + AddIf( null != this._dailySchedule ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._dailySchedule.ToJson(null,serializationMode) : null, "dailySchedule" ,container.Add ); + AddIf( null != this._weeklySchedule ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._weeklySchedule.ToJson(null,serializationMode) : null, "weeklySchedule" ,container.Add ); + AddIf( null != this._monthlySchedule ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._monthlySchedule.ToJson(null,serializationMode) : null, "monthlySchedule" ,container.Add ); + AddIf( null != this._yearlySchedule ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._yearlySchedule.ToJson(null,serializationMode) : null, "yearlySchedule" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermSchedulePolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermSchedulePolicy.cs new file mode 100644 index 000000000000..72505f859746 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermSchedulePolicy.cs @@ -0,0 +1,59 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Long term policy schedule. + public partial class LongTermSchedulePolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermSchedulePolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermSchedulePolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy __schedulePolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)__schedulePolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)__schedulePolicy).Type = value ; } + + /// Creates an new instance. + public LongTermSchedulePolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__schedulePolicy), __schedulePolicy); + await eventListener.AssertObjectIsValid(nameof(__schedulePolicy), __schedulePolicy); + } + } + /// Long term policy schedule. + public partial interface ILongTermSchedulePolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy + { + + } + /// Long term policy schedule. + internal partial interface ILongTermSchedulePolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermSchedulePolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermSchedulePolicy.json.cs new file mode 100644 index 000000000000..263ce7189b83 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/LongTermSchedulePolicy.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Long term policy schedule. + public partial class LongTermSchedulePolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermSchedulePolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermSchedulePolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ILongTermSchedulePolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new LongTermSchedulePolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal LongTermSchedulePolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __schedulePolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __schedulePolicy?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainer.cs new file mode 100644 index 000000000000..ec8a0bbfaf95 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainer.cs @@ -0,0 +1,266 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container with items backed up using MAB backup engine. + public partial class MabContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(); + + /// Backing field for property. + private string _agentVersion; + + /// Agent version of this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AgentVersion { get => this._agentVersion; set => this._agentVersion = value; } + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private bool? _canReRegister; + + /// Can the container be registered one more time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? CanReRegister { get => this._canReRegister; set => this._canReRegister = value; } + + /// Backing field for property. + private string _containerHealthState; + + /// Health state of mab container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerHealthState { get => this._containerHealthState; set => this._containerHealthState = value; } + + /// Backing field for property. + private long? _containerId; + + /// ContainerID represents the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? ContainerId { get => this._containerId; set => this._containerId = value; } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ContainerType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfo _extendedInfo; + + /// Additional information for this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabContainerExtendedInfo()); set => this._extendedInfo = value; } + + /// List of backup items associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ExtendedInfoBackupItem { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).BackupItem; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).BackupItem = value ?? null /* arrayOf */; } + + /// Type of backup items associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType? ExtendedInfoBackupItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).BackupItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).BackupItemType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType)""); } + + /// Latest backup status of this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoLastBackupStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).LastBackupStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).LastBackupStatus = value ?? null; } + + /// Time stamp when this container was refreshed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoLastRefreshedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).LastRefreshedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).LastRefreshedAt = value ?? default(global::System.DateTime); } + + /// Backup policy associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal)ExtendedInfo).PolicyName = value ?? null; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).FriendlyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails[] _healthDetail; + + /// Health details on this mab container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails[] HealthDetail { get => this._healthDetail; set => this._healthDetail = value; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).HealthStatus = value ?? null; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabContainerExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).ProtectableObjectType = value ?? null; } + + /// Backing field for property. + private long? _protectedItemCount; + + /// Number of items backed up in this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? ProtectedItemCount { get => this._protectedItemCount; set => this._protectedItemCount = value; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)__protectionContainer).RegistrationStatus = value ?? null; } + + /// Creates an new instance. + public MabContainer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionContainer), __protectionContainer); + await eventListener.AssertObjectIsValid(nameof(__protectionContainer), __protectionContainer); + } + } + /// Container with items backed up using MAB backup engine. + public partial interface IMabContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer + { + /// Agent version of this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Agent version of this container.", + SerializedName = @"agentVersion", + PossibleTypes = new [] { typeof(string) })] + string AgentVersion { get; set; } + /// Can the container be registered one more time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Can the container be registered one more time.", + SerializedName = @"canReRegister", + PossibleTypes = new [] { typeof(bool) })] + bool? CanReRegister { get; set; } + /// Health state of mab container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health state of mab container.", + SerializedName = @"containerHealthState", + PossibleTypes = new [] { typeof(string) })] + string ContainerHealthState { get; set; } + /// ContainerID represents the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ContainerID represents the container.", + SerializedName = @"containerId", + PossibleTypes = new [] { typeof(long) })] + long? ContainerId { get; set; } + /// List of backup items associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of backup items associated with this container.", + SerializedName = @"backupItems", + PossibleTypes = new [] { typeof(string) })] + string[] ExtendedInfoBackupItem { get; set; } + /// Type of backup items associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup items associated with this container.", + SerializedName = @"backupItemType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType? ExtendedInfoBackupItemType { get; set; } + /// Latest backup status of this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Latest backup status of this container.", + SerializedName = @"lastBackupStatus", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoLastBackupStatus { get; set; } + /// Time stamp when this container was refreshed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time stamp when this container was refreshed.", + SerializedName = @"lastRefreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoLastRefreshedAt { get; set; } + /// Backup policy associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup policy associated with this container.", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoPolicyName { get; set; } + /// Health details on this mab container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health details on this mab container.", + SerializedName = @"mabContainerHealthDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails[] HealthDetail { get; set; } + /// Number of items backed up in this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of items backed up in this container.", + SerializedName = @"protectedItemCount", + PossibleTypes = new [] { typeof(long) })] + long? ProtectedItemCount { get; set; } + + } + /// Container with items backed up using MAB backup engine. + internal partial interface IMabContainerInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal + { + /// Agent version of this container. + string AgentVersion { get; set; } + /// Can the container be registered one more time. + bool? CanReRegister { get; set; } + /// Health state of mab container. + string ContainerHealthState { get; set; } + /// ContainerID represents the container. + long? ContainerId { get; set; } + /// Additional information for this container + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfo ExtendedInfo { get; set; } + /// List of backup items associated with this container. + string[] ExtendedInfoBackupItem { get; set; } + /// Type of backup items associated with this container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType? ExtendedInfoBackupItemType { get; set; } + /// Latest backup status of this container. + string ExtendedInfoLastBackupStatus { get; set; } + /// Time stamp when this container was refreshed. + global::System.DateTime? ExtendedInfoLastRefreshedAt { get; set; } + /// Backup policy associated with this container. + string ExtendedInfoPolicyName { get; set; } + /// Health details on this mab container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails[] HealthDetail { get; set; } + /// Number of items backed up in this container. + long? ProtectedItemCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainer.json.cs new file mode 100644 index 000000000000..1758e92f1dbe --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainer.json.cs @@ -0,0 +1,130 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Container with items backed up using MAB backup engine. + public partial class MabContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabContainer(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionContainer = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabContainerExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_canReRegister = If( json?.PropertyT("canReRegister"), out var __jsonCanReRegister) ? (bool?)__jsonCanReRegister : CanReRegister;} + {_containerId = If( json?.PropertyT("containerId"), out var __jsonContainerId) ? (long?)__jsonContainerId : ContainerId;} + {_protectedItemCount = If( json?.PropertyT("protectedItemCount"), out var __jsonProtectedItemCount) ? (long?)__jsonProtectedItemCount : ProtectedItemCount;} + {_agentVersion = If( json?.PropertyT("agentVersion"), out var __jsonAgentVersion) ? (string)__jsonAgentVersion : (string)AgentVersion;} + {_healthDetail = If( json?.PropertyT("mabContainerHealthDetails"), out var __jsonMabContainerHealthDetails) ? If( __jsonMabContainerHealthDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabContainerHealthDetails.FromJson(__u) )) ))() : null : HealthDetail;} + {_containerHealthState = If( json?.PropertyT("containerHealthState"), out var __jsonContainerHealthState) ? (string)__jsonContainerHealthState : (string)ContainerHealthState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionContainer?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != this._canReRegister ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._canReRegister) : null, "canReRegister" ,container.Add ); + AddIf( null != this._containerId ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._containerId) : null, "containerId" ,container.Add ); + AddIf( null != this._protectedItemCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._protectedItemCount) : null, "protectedItemCount" ,container.Add ); + AddIf( null != (((object)this._agentVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._agentVersion.ToString()) : null, "agentVersion" ,container.Add ); + if (null != this._healthDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._healthDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("mabContainerHealthDetails",__w); + } + AddIf( null != (((object)this._containerHealthState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerHealthState.ToString()) : null, "containerHealthState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerExtendedInfo.cs new file mode 100644 index 000000000000..597e3be3b9e6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerExtendedInfo.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information of the container. + public partial class MabContainerExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfoInternal + { + + /// Backing field for property. + private string[] _backupItem; + + /// List of backup items associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] BackupItem { get => this._backupItem; set => this._backupItem = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType? _backupItemType; + + /// Type of backup items associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType? BackupItemType { get => this._backupItemType; set => this._backupItemType = value; } + + /// Backing field for property. + private string _lastBackupStatus; + + /// Latest backup status of this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LastBackupStatus { get => this._lastBackupStatus; set => this._lastBackupStatus = value; } + + /// Backing field for property. + private global::System.DateTime? _lastRefreshedAt; + + /// Time stamp when this container was refreshed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastRefreshedAt { get => this._lastRefreshedAt; set => this._lastRefreshedAt = value; } + + /// Backing field for property. + private string _policyName; + + /// Backup policy associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyName { get => this._policyName; set => this._policyName = value; } + + /// Creates an new instance. + public MabContainerExtendedInfo() + { + + } + } + /// Additional information of the container. + public partial interface IMabContainerExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of backup items associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of backup items associated with this container.", + SerializedName = @"backupItems", + PossibleTypes = new [] { typeof(string) })] + string[] BackupItem { get; set; } + /// Type of backup items associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup items associated with this container.", + SerializedName = @"backupItemType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType? BackupItemType { get; set; } + /// Latest backup status of this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Latest backup status of this container.", + SerializedName = @"lastBackupStatus", + PossibleTypes = new [] { typeof(string) })] + string LastBackupStatus { get; set; } + /// Time stamp when this container was refreshed. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time stamp when this container was refreshed.", + SerializedName = @"lastRefreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastRefreshedAt { get; set; } + /// Backup policy associated with this container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup policy associated with this container.", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; set; } + + } + /// Additional information of the container. + internal partial interface IMabContainerExtendedInfoInternal + + { + /// List of backup items associated with this container. + string[] BackupItem { get; set; } + /// Type of backup items associated with this container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType? BackupItemType { get; set; } + /// Latest backup status of this container. + string LastBackupStatus { get; set; } + /// Time stamp when this container was refreshed. + global::System.DateTime? LastRefreshedAt { get; set; } + /// Backup policy associated with this container. + string PolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerExtendedInfo.json.cs new file mode 100644 index 000000000000..f236f7817687 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerExtendedInfo.json.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information of the container. + public partial class MabContainerExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabContainerExtendedInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabContainerExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_lastRefreshedAt = If( json?.PropertyT("lastRefreshedAt"), out var __jsonLastRefreshedAt) ? global::System.DateTime.TryParse((string)__jsonLastRefreshedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastRefreshedAtValue) ? __jsonLastRefreshedAtValue : LastRefreshedAt : LastRefreshedAt;} + {_backupItemType = If( json?.PropertyT("backupItemType"), out var __jsonBackupItemType) ? (string)__jsonBackupItemType : (string)BackupItemType;} + {_backupItem = If( json?.PropertyT("backupItems"), out var __jsonBackupItems) ? If( __jsonBackupItems as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : BackupItem;} + {_policyName = If( json?.PropertyT("policyName"), out var __jsonPolicyName) ? (string)__jsonPolicyName : (string)PolicyName;} + {_lastBackupStatus = If( json?.PropertyT("lastBackupStatus"), out var __jsonLastBackupStatus) ? (string)__jsonLastBackupStatus : (string)LastBackupStatus;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._lastRefreshedAt ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastRefreshedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastRefreshedAt" ,container.Add ); + AddIf( null != (((object)this._backupItemType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupItemType.ToString()) : null, "backupItemType" ,container.Add ); + if (null != this._backupItem) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._backupItem ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("backupItems",__w); + } + AddIf( null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName" ,container.Add ); + AddIf( null != (((object)this._lastBackupStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupStatus.ToString()) : null, "lastBackupStatus" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerHealthDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerHealthDetails.cs new file mode 100644 index 000000000000..5b4d0e415b9a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerHealthDetails.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific Health Details. + public partial class MabContainerHealthDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetailsInternal + { + + /// Backing field for property. + private int? _code; + + /// Health Code + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Code { get => this._code; set => this._code = value; } + + /// Backing field for property. + private string _message; + + /// Health Message + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private string[] _recommendation; + + /// Health Recommended Actions + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Recommendation { get => this._recommendation; set => this._recommendation = value; } + + /// Backing field for property. + private string _title; + + /// Health Title + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Title { get => this._title; set => this._title = value; } + + /// Creates an new instance. + public MabContainerHealthDetails() + { + + } + } + /// MAB workload-specific Health Details. + public partial interface IMabContainerHealthDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Health Code + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health Code", + SerializedName = @"code", + PossibleTypes = new [] { typeof(int) })] + int? Code { get; set; } + /// Health Message + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health Message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Health Recommended Actions + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health Recommended Actions", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] Recommendation { get; set; } + /// Health Title + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health Title", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; set; } + + } + /// MAB workload-specific Health Details. + internal partial interface IMabContainerHealthDetailsInternal + + { + /// Health Code + int? Code { get; set; } + /// Health Message + string Message { get; set; } + /// Health Recommended Actions + string[] Recommendation { get; set; } + /// Health Title + string Title { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerHealthDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerHealthDetails.json.cs new file mode 100644 index 000000000000..5316a6284cda --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabContainerHealthDetails.json.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific Health Details. + public partial class MabContainerHealthDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabContainerHealthDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabContainerHealthDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabContainerHealthDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (int?)__jsonCode : Code;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_recommendation = If( json?.PropertyT("recommendations"), out var __jsonRecommendations) ? If( __jsonRecommendations as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Recommendation;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._code ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._code) : null, "code" ,container.Add ); + AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + if (null != this._recommendation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recommendation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("recommendations",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabErrorInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabErrorInfo.cs new file mode 100644 index 000000000000..cef11492b9bb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabErrorInfo.cs @@ -0,0 +1,74 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific error information. + public partial class MabErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfoInternal + { + + /// Backing field for property. + private string _errorString; + + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorString { get => this._errorString; } + + /// Internal Acessors for ErrorString + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfoInternal.ErrorString { get => this._errorString; set { {_errorString = value;} } } + + /// Internal Acessors for Recommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfoInternal.Recommendation { get => this._recommendation; set { {_recommendation = value;} } } + + /// Backing field for property. + private string[] _recommendation; + + /// List of localized recommendations. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Recommendation { get => this._recommendation; } + + /// Creates an new instance. + public MabErrorInfo() + { + + } + } + /// MAB workload-specific error information. + public partial interface IMabErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Localized error string.", + SerializedName = @"errorString", + PossibleTypes = new [] { typeof(string) })] + string ErrorString { get; } + /// List of localized recommendations. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of localized recommendations.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] Recommendation { get; } + + } + /// MAB workload-specific error information. + internal partial interface IMabErrorInfoInternal + + { + /// Localized error string. + string ErrorString { get; set; } + /// List of localized recommendations. + string[] Recommendation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabErrorInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabErrorInfo.json.cs new file mode 100644 index 000000000000..6536ec4d5cb4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabErrorInfo.json.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific error information. + public partial class MabErrorInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabErrorInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabErrorInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorString = If( json?.PropertyT("errorString"), out var __jsonErrorString) ? (string)__jsonErrorString : (string)ErrorString;} + {_recommendation = If( json?.PropertyT("recommendations"), out var __jsonRecommendations) ? If( __jsonRecommendations as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Recommendation;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._errorString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorString.ToString()) : null, "errorString" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._recommendation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recommendation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("recommendations",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItem.cs new file mode 100644 index 000000000000..53d96bbe0d7d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItem.cs @@ -0,0 +1,296 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific backup item. + public partial class MabFileFolderProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupSetName = value ?? null; } + + /// Backing field for property. + private string _computerName; + + /// Name of the computer associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ComputerName { get => this._computerName; set => this._computerName = value; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Backing field for property. + private long? _deferredDeleteSyncTimeInUtc; + + /// Sync time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? DeferredDeleteSyncTimeInUtc { get => this._deferredDeleteSyncTimeInUtc; set => this._deferredDeleteSyncTimeInUtc = value; } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).DeferredDeleteTimeRemaining = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfo _extendedInfo; + + /// Additional information with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabFileFolderProtectedItemExtendedInfo()); set => this._extendedInfo = value; } + + /// Last time when the agent data synced to service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoLastRefreshedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfoInternal)ExtendedInfo).LastRefreshedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfoInternal)ExtendedInfo).LastRefreshedAt = value ?? default(global::System.DateTime); } + + /// The oldest backup copy available. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfoInternal)ExtendedInfo).OldestRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Number of backup copies associated with the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ExtendedInfoRecoveryPointCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfoInternal)ExtendedInfo).RecoveryPointCount = value ?? default(int); } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Backing field for property. + private string _lastBackupStatus; + + /// Status of last backup operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LastBackupStatus { get => this._lastBackupStatus; set => this._lastBackupStatus = value; } + + /// Backing field for property. + private global::System.DateTime? _lastBackupTime; + + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastBackupTime { get => this._lastBackupTime; set => this._lastBackupTime = value; } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabFileFolderProtectedItemExtendedInfo()); set { {_extendedInfo = value;} } } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).BackupManagementType = value; } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType = value; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).PolicyName = value ?? null; } + + /// Backing field for property. + private string _protectionState; + + /// Protected, ProtectionStopped, IRPending or ProtectionError + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).SourceResourceId = value ?? null; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).Type = value ; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)__protectedItem).WorkloadType; } + + /// Creates an new instance. + public MabFileFolderProtectedItem() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectedItem), __protectedItem); + await eventListener.AssertObjectIsValid(nameof(__protectedItem), __protectedItem); + } + } + /// MAB workload-specific backup item. + public partial interface IMabFileFolderProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem + { + /// Name of the computer associated with this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the computer associated with this backup item.", + SerializedName = @"computerName", + PossibleTypes = new [] { typeof(string) })] + string ComputerName { get; set; } + /// Sync time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sync time for deferred deletion in UTC", + SerializedName = @"deferredDeleteSyncTimeInUTC", + PossibleTypes = new [] { typeof(long) })] + long? DeferredDeleteSyncTimeInUtc { get; set; } + /// Last time when the agent data synced to service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last time when the agent data synced to service.", + SerializedName = @"lastRefreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoLastRefreshedAt { get; set; } + /// The oldest backup copy available. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// Number of backup copies associated with the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of backup copies associated with the backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? ExtendedInfoRecoveryPointCount { get; set; } + /// Friendly name of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of this backup item.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Status of last backup operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of last backup operation.", + SerializedName = @"lastBackupStatus", + PossibleTypes = new [] { typeof(string) })] + string LastBackupStatus { get; set; } + /// Timestamp of the last backup operation on this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timestamp of the last backup operation on this backup item.", + SerializedName = @"lastBackupTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastBackupTime { get; set; } + /// Protected, ProtectionStopped, IRPending or ProtectionError + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protected, ProtectionStopped, IRPending or ProtectionError", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(string) })] + string ProtectionState { get; set; } + + } + /// MAB workload-specific backup item. + internal partial interface IMabFileFolderProtectedItemInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal + { + /// Name of the computer associated with this backup item. + string ComputerName { get; set; } + /// Sync time for deferred deletion in UTC + long? DeferredDeleteSyncTimeInUtc { get; set; } + /// Additional information with this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfo ExtendedInfo { get; set; } + /// Last time when the agent data synced to service. + global::System.DateTime? ExtendedInfoLastRefreshedAt { get; set; } + /// The oldest backup copy available. + global::System.DateTime? ExtendedInfoOldestRecoveryPoint { get; set; } + /// Number of backup copies associated with the backup item. + int? ExtendedInfoRecoveryPointCount { get; set; } + /// Friendly name of this backup item. + string FriendlyName { get; set; } + /// Status of last backup operation. + string LastBackupStatus { get; set; } + /// Timestamp of the last backup operation on this backup item. + global::System.DateTime? LastBackupTime { get; set; } + /// Protected, ProtectionStopped, IRPending or ProtectionError + string ProtectionState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItem.json.cs new file mode 100644 index 000000000000..ed4d6b810e9c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItem.json.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific backup item. + public partial class MabFileFolderProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabFileFolderProtectedItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabFileFolderProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectedItem = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabFileFolderProtectedItemExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_computerName = If( json?.PropertyT("computerName"), out var __jsonComputerName) ? (string)__jsonComputerName : (string)ComputerName;} + {_lastBackupStatus = If( json?.PropertyT("lastBackupStatus"), out var __jsonLastBackupStatus) ? (string)__jsonLastBackupStatus : (string)LastBackupStatus;} + {_lastBackupTime = If( json?.PropertyT("lastBackupTime"), out var __jsonLastBackupTime) ? global::System.DateTime.TryParse((string)__jsonLastBackupTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastBackupTimeValue) ? __jsonLastBackupTimeValue : LastBackupTime : LastBackupTime;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + {_deferredDeleteSyncTimeInUtc = If( json?.PropertyT("deferredDeleteSyncTimeInUTC"), out var __jsonDeferredDeleteSyncTimeInUtc) ? (long?)__jsonDeferredDeleteSyncTimeInUtc : DeferredDeleteSyncTimeInUtc;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectedItem?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._computerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._computerName.ToString()) : null, "computerName" ,container.Add ); + AddIf( null != (((object)this._lastBackupStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupStatus.ToString()) : null, "lastBackupStatus" ,container.Add ); + AddIf( null != this._lastBackupTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastBackupTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastBackupTime" ,container.Add ); + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + AddIf( null != this._deferredDeleteSyncTimeInUtc ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._deferredDeleteSyncTimeInUtc) : null, "deferredDeleteSyncTimeInUTC" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItemExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItemExtendedInfo.cs new file mode 100644 index 000000000000..e4f27fb18f8e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItemExtendedInfo.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on the backed up item. + public partial class MabFileFolderProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfoInternal + { + + /// Backing field for property. + private global::System.DateTime? _lastRefreshedAt; + + /// Last time when the agent data synced to service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastRefreshedAt { get => this._lastRefreshedAt; set => this._lastRefreshedAt = value; } + + /// Backing field for property. + private global::System.DateTime? _oldestRecoveryPoint; + + /// The oldest backup copy available. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? OldestRecoveryPoint { get => this._oldestRecoveryPoint; set => this._oldestRecoveryPoint = value; } + + /// Backing field for property. + private int? _recoveryPointCount; + + /// Number of backup copies associated with the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? RecoveryPointCount { get => this._recoveryPointCount; set => this._recoveryPointCount = value; } + + /// Creates an new instance. + public MabFileFolderProtectedItemExtendedInfo() + { + + } + } + /// Additional information on the backed up item. + public partial interface IMabFileFolderProtectedItemExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Last time when the agent data synced to service. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last time when the agent data synced to service.", + SerializedName = @"lastRefreshedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastRefreshedAt { get; set; } + /// The oldest backup copy available. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The oldest backup copy available.", + SerializedName = @"oldestRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// Number of backup copies associated with the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of backup copies associated with the backup item.", + SerializedName = @"recoveryPointCount", + PossibleTypes = new [] { typeof(int) })] + int? RecoveryPointCount { get; set; } + + } + /// Additional information on the backed up item. + internal partial interface IMabFileFolderProtectedItemExtendedInfoInternal + + { + /// Last time when the agent data synced to service. + global::System.DateTime? LastRefreshedAt { get; set; } + /// The oldest backup copy available. + global::System.DateTime? OldestRecoveryPoint { get; set; } + /// Number of backup copies associated with the backup item. + int? RecoveryPointCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItemExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItemExtendedInfo.json.cs new file mode 100644 index 000000000000..5ad4f2e74b4a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabFileFolderProtectedItemExtendedInfo.json.cs @@ -0,0 +1,113 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information on the backed up item. + public partial class MabFileFolderProtectedItemExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabFileFolderProtectedItemExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabFileFolderProtectedItemExtendedInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabFileFolderProtectedItemExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_lastRefreshedAt = If( json?.PropertyT("lastRefreshedAt"), out var __jsonLastRefreshedAt) ? global::System.DateTime.TryParse((string)__jsonLastRefreshedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastRefreshedAtValue) ? __jsonLastRefreshedAtValue : LastRefreshedAt : LastRefreshedAt;} + {_oldestRecoveryPoint = If( json?.PropertyT("oldestRecoveryPoint"), out var __jsonOldestRecoveryPoint) ? global::System.DateTime.TryParse((string)__jsonOldestRecoveryPoint, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOldestRecoveryPointValue) ? __jsonOldestRecoveryPointValue : OldestRecoveryPoint : OldestRecoveryPoint;} + {_recoveryPointCount = If( json?.PropertyT("recoveryPointCount"), out var __jsonRecoveryPointCount) ? (int?)__jsonRecoveryPointCount : RecoveryPointCount;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._lastRefreshedAt ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastRefreshedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastRefreshedAt" ,container.Add ); + AddIf( null != this._oldestRecoveryPoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._oldestRecoveryPoint?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "oldestRecoveryPoint" ,container.Add ); + AddIf( null != this._recoveryPointCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._recoveryPointCount) : null, "recoveryPointCount" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJob.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJob.cs new file mode 100644 index 000000000000..3a10bd62ae38 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJob.cs @@ -0,0 +1,243 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific job. + public partial class MabJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJob, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] _actionsInfo; + + /// The state/actions applicable on jobs like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get => this._actionsInfo; set => this._actionsInfo = value; } + + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ActivityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId = value ?? null; } + + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time taken by job to run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime = value ?? default(global::System.DateTime); } + + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EntityFriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo[] _errorDetail; + + /// The errors. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo[] ErrorDetail { get => this._errorDetail; set => this._errorDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfo _extendedInfo; + + /// Additional information on the job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabJobExtendedInfo()); set => this._extendedInfo = value; } + + /// Non localized error message specific to this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ExtendedInfoDynamicErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoInternal)ExtendedInfo).DynamicErrorMessage = value ?? null; } + + /// The job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoInternal)ExtendedInfo).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoInternal)ExtendedInfo).PropertyBag = value ?? null /* model class */; } + + /// List of tasks for this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails[] ExtendedInfoTasksList { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoInternal)ExtendedInfo).TasksList; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoInternal)ExtendedInfo).TasksList = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _mabServerName; + + /// Name of server protecting the DS. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string MabServerName { get => this._mabServerName; set => this._mabServerName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType? _mabServerType; + + /// Server type of MAB container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType? MabServerType { get => this._mabServerType; set => this._mabServerType = value; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabJobExtendedInfo()); set { {_extendedInfo = value;} } } + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation = value ?? null; } + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime = value ?? default(global::System.DateTime); } + + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status = value ?? null; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? _workloadType; + + /// Workload type of backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public MabJob() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__job), __job); + await eventListener.AssertObjectIsValid(nameof(__job), __job); + } + } + /// MAB workload-specific job. + public partial interface IMabJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob + { + /// The state/actions applicable on jobs like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The state/actions applicable on jobs like cancel/retry.", + SerializedName = @"actionsInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Time taken by job to run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time taken by job to run.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// The errors. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The errors.", + SerializedName = @"errorDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo[] ErrorDetail { get; set; } + /// Non localized error message specific to this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message specific to this job.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string ExtendedInfoDynamicErrorMessage { get; set; } + /// The job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks for this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks for this job.", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Name of server protecting the DS. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of server protecting the DS.", + SerializedName = @"mabServerName", + PossibleTypes = new [] { typeof(string) })] + string MabServerName { get; set; } + /// Server type of MAB container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Server type of MAB container.", + SerializedName = @"mabServerType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType? MabServerType { get; set; } + /// Workload type of backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload type of backup item.", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } + /// MAB workload-specific job. + internal partial interface IMabJobInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal + { + /// The state/actions applicable on jobs like cancel/retry. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Time taken by job to run. + global::System.TimeSpan? Duration { get; set; } + /// The errors. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo[] ErrorDetail { get; set; } + /// Additional information on the job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfo ExtendedInfo { get; set; } + /// Non localized error message specific to this job. + string ExtendedInfoDynamicErrorMessage { get; set; } + /// The job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + /// List of tasks for this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails[] ExtendedInfoTasksList { get; set; } + /// Name of server protecting the DS. + string MabServerName { get; set; } + /// Server type of MAB container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType? MabServerType { get; set; } + /// Workload type of backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJob.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJob.json.cs new file mode 100644 index 000000000000..6b9a1cb86781 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJob.json.cs @@ -0,0 +1,138 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific job. + public partial class MabJob + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJob. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJob. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabJob(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabJob(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabJobExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_actionsInfo = If( json?.PropertyT("actionsInfo"), out var __jsonActionsInfo) ? If( __jsonActionsInfo as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)""))) ))() : null : ActionsInfo;} + {_mabServerName = If( json?.PropertyT("mabServerName"), out var __jsonMabServerName) ? (string)__jsonMabServerName : (string)MabServerName;} + {_mabServerType = If( json?.PropertyT("mabServerType"), out var __jsonMabServerType) ? (string)__jsonMabServerType : (string)MabServerType;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? If( __jsonErrorDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabErrorInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabErrorInfo.FromJson(__p) )) ))() : null : ErrorDetail;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __job?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + if (null != this._actionsInfo) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._actionsInfo ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("actionsInfo",__w); + } + AddIf( null != (((object)this._mabServerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._mabServerName.ToString()) : null, "mabServerName" ,container.Add ); + AddIf( null != (((object)this._mabServerType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._mabServerType.ToString()) : null, "mabServerType" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + if (null != this._errorDetail) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._errorDetail ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("errorDetails",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfo.cs new file mode 100644 index 000000000000..5b6cee58796d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfo.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information for the MAB workload-specific job. + public partial class MabJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoInternal + { + + /// Backing field for property. + private string _dynamicErrorMessage; + + /// Non localized error message specific to this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DynamicErrorMessage { get => this._dynamicErrorMessage; set => this._dynamicErrorMessage = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag _propertyBag; + + /// The job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag PropertyBag { get => (this._propertyBag = this._propertyBag ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabJobExtendedInfoPropertyBag()); set => this._propertyBag = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails[] _tasksList; + + /// List of tasks for this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails[] TasksList { get => this._tasksList; set => this._tasksList = value; } + + /// Creates an new instance. + public MabJobExtendedInfo() + { + + } + } + /// Additional information for the MAB workload-specific job. + public partial interface IMabJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Non localized error message specific to this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Non localized error message specific to this job.", + SerializedName = @"dynamicErrorMessage", + PossibleTypes = new [] { typeof(string) })] + string DynamicErrorMessage { get; set; } + /// The job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks for this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of tasks for this job.", + SerializedName = @"tasksList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails[] TasksList { get; set; } + + } + /// Additional information for the MAB workload-specific job. + internal partial interface IMabJobExtendedInfoInternal + + { + /// Non localized error message specific to this job. + string DynamicErrorMessage { get; set; } + /// The job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag PropertyBag { get; set; } + /// List of tasks for this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails[] TasksList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfo.json.cs new file mode 100644 index 000000000000..4f1f7a606507 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfo.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Additional information for the MAB workload-specific job. + public partial class MabJobExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabJobExtendedInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabJobExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_tasksList = If( json?.PropertyT("tasksList"), out var __jsonTasksList) ? If( __jsonTasksList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabJobTaskDetails.FromJson(__u) )) ))() : null : TasksList;} + {_propertyBag = If( json?.PropertyT("propertyBag"), out var __jsonPropertyBag) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabJobExtendedInfoPropertyBag.FromJson(__jsonPropertyBag) : PropertyBag;} + {_dynamicErrorMessage = If( json?.PropertyT("dynamicErrorMessage"), out var __jsonDynamicErrorMessage) ? (string)__jsonDynamicErrorMessage : (string)DynamicErrorMessage;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._tasksList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._tasksList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tasksList",__w); + } + AddIf( null != this._propertyBag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._propertyBag.ToJson(null,serializationMode) : null, "propertyBag" ,container.Add ); + AddIf( null != (((object)this._dynamicErrorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dynamicErrorMessage.ToString()) : null, "dynamicErrorMessage" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfoPropertyBag.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfoPropertyBag.cs new file mode 100644 index 000000000000..d7c9601fdba2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfoPropertyBag.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The job properties. + public partial class MabJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBagInternal + { + + /// Creates an new instance. + public MabJobExtendedInfoPropertyBag() + { + + } + } + /// The job properties. + public partial interface IMabJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// The job properties. + internal partial interface IMabJobExtendedInfoPropertyBagInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfoPropertyBag.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfoPropertyBag.dictionary.cs new file mode 100644 index 000000000000..cb30240d63e3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfoPropertyBag.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class MabJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.MabJobExtendedInfoPropertyBag source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfoPropertyBag.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfoPropertyBag.json.cs new file mode 100644 index 000000000000..2dfc5bd22f52 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobExtendedInfoPropertyBag.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The job properties. + public partial class MabJobExtendedInfoPropertyBag + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobExtendedInfoPropertyBag FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabJobExtendedInfoPropertyBag(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal MabJobExtendedInfoPropertyBag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobTaskDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobTaskDetails.cs new file mode 100644 index 000000000000..189bd1555a8a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobTaskDetails.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific job task details. + public partial class MabJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetailsInternal + { + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time elapsed for task. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private string _status; + + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private string _taskId; + + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TaskId { get => this._taskId; set => this._taskId = value; } + + /// Creates an new instance. + public MabJobTaskDetails() + { + + } + } + /// MAB workload-specific job task details. + public partial interface IMabJobTaskDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Time elapsed for task. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time elapsed for task.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// The status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// The task display name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The task display name.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; set; } + + } + /// MAB workload-specific job task details. + internal partial interface IMabJobTaskDetailsInternal + + { + /// Time elapsed for task. + global::System.TimeSpan? Duration { get; set; } + /// The end time. + global::System.DateTime? EndTime { get; set; } + /// The start time. + global::System.DateTime? StartTime { get; set; } + /// The status. + string Status { get; set; } + /// The task display name. + string TaskId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobTaskDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobTaskDetails.json.cs new file mode 100644 index 000000000000..569677a4d709 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabJobTaskDetails.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// MAB workload-specific job task details. + public partial class MabJobTaskDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabJobTaskDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabJobTaskDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabJobTaskDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_taskId = If( json?.PropertyT("taskId"), out var __jsonTaskId) ? (string)__jsonTaskId : (string)TaskId;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._taskId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._taskId.ToString()) : null, "taskId" ,container.Add ); + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabProtectionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabProtectionPolicy.cs new file mode 100644 index 000000000000..2ed19ae6845c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabProtectionPolicy.cs @@ -0,0 +1,131 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Mab container-specific backup policy. + public partial class MabProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabProtectionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabProtectionPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).BackupManagementType = value ; } + + /// Internal Acessors for RetentionPolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabProtectionPolicyInternal.RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set { {_retentionPolicy = value;} } } + + /// Internal Acessors for SchedulePolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabProtectionPolicyInternal.SchedulePolicy { get => (this._schedulePolicy = this._schedulePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy()); set { {_schedulePolicy = value;} } } + + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public int? ProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ProtectedItemsCount = value ?? default(int); } + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)__protectionPolicy).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy _retentionPolicy; + + /// Retention policy details. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set => this._retentionPolicy = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RetentionPolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy _schedulePolicy; + + /// Backup schedule of backup policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy SchedulePolicy { get => (this._schedulePolicy = this._schedulePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy()); set => this._schedulePolicy = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SchedulePolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)SchedulePolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)SchedulePolicy).Type = value ?? null; } + + /// Creates an new instance. + public MabProtectionPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__protectionPolicy), __protectionPolicy); + await eventListener.AssertObjectIsValid(nameof(__protectionPolicy), __protectionPolicy); + } + } + /// Mab container-specific backup policy. + public partial interface IMabProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"retentionPolicyType", + PossibleTypes = new [] { typeof(string) })] + string RetentionPolicyType { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"schedulePolicyType", + PossibleTypes = new [] { typeof(string) })] + string SchedulePolicyType { get; set; } + + } + /// Mab container-specific backup policy. + internal partial interface IMabProtectionPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal + { + /// Retention policy details. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string RetentionPolicyType { get; set; } + /// Backup schedule of backup policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy SchedulePolicy { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string SchedulePolicyType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabProtectionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabProtectionPolicy.json.cs new file mode 100644 index 000000000000..a3628088861d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MabProtectionPolicy.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Mab container-specific backup policy. + public partial class MabProtectionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabProtectionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabProtectionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMabProtectionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MabProtectionPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MabProtectionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __protectionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy(json); + {_schedulePolicy = If( json?.PropertyT("schedulePolicy"), out var __jsonSchedulePolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy.FromJson(__jsonSchedulePolicy) : SchedulePolicy;} + {_retentionPolicy = If( json?.PropertyT("retentionPolicy"), out var __jsonRetentionPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy.FromJson(__jsonRetentionPolicy) : RetentionPolicy;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __protectionPolicy?.ToJson(container, serializationMode); + AddIf( null != this._schedulePolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._schedulePolicy.ToJson(null,serializationMode) : null, "schedulePolicy" ,container.Add ); + AddIf( null != this._retentionPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionPolicy.ToJson(null,serializationMode) : null, "retentionPolicy" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MonthlyRetentionSchedule.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MonthlyRetentionSchedule.cs new file mode 100644 index 000000000000..5fd1e17191bb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MonthlyRetentionSchedule.cs @@ -0,0 +1,184 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Monthly retention schedule. + public partial class MonthlyRetentionSchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionSchedule, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal + { + + /// Internal Acessors for RetentionDuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal.RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set { {_retentionDuration = value;} } } + + /// Internal Acessors for RetentionScheduleDaily + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal.RetentionScheduleDaily { get => (this._retentionScheduleDaily = this._retentionScheduleDaily ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailyRetentionFormat()); set { {_retentionScheduleDaily = value;} } } + + /// Internal Acessors for RetentionScheduleWeekly + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionScheduleInternal.RetentionScheduleWeekly { get => (this._retentionScheduleWeekly = this._retentionScheduleWeekly ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklyRetentionFormat()); set { {_retentionScheduleWeekly = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration _retentionDuration; + + /// Retention duration of retention Policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set => this._retentionDuration = value; } + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? RetentionDurationCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count = value ?? default(int); } + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat _retentionScheduleDaily; + + /// Daily retention format for monthly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat RetentionScheduleDaily { get => (this._retentionScheduleDaily = this._retentionScheduleDaily ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailyRetentionFormat()); set => this._retentionScheduleDaily = value; } + + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] RetentionScheduleDailyDaysOfTheMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormatInternal)RetentionScheduleDaily).DaysOfTheMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormatInternal)RetentionScheduleDaily).DaysOfTheMonth = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? _retentionScheduleFormatType; + + /// Retention schedule format type for monthly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? RetentionScheduleFormatType { get => this._retentionScheduleFormatType; set => this._retentionScheduleFormatType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat _retentionScheduleWeekly; + + /// Weekly retention format for monthly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat RetentionScheduleWeekly { get => (this._retentionScheduleWeekly = this._retentionScheduleWeekly ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklyRetentionFormat()); set => this._retentionScheduleWeekly = value; } + + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] RetentionScheduleWeeklyDaysOfTheWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormatInternal)RetentionScheduleWeekly).DaysOfTheWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormatInternal)RetentionScheduleWeekly).DaysOfTheWeek = value ?? null /* arrayOf */; } + + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] RetentionScheduleWeeklyWeeksOfTheMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormatInternal)RetentionScheduleWeekly).WeeksOfTheMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormatInternal)RetentionScheduleWeekly).WeeksOfTheMonth = value ?? null /* arrayOf */; } + + /// Backing field for property. + private global::System.DateTime[] _retentionTime; + + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime[] RetentionTime { get => this._retentionTime; set => this._retentionTime = value; } + + /// Creates an new instance. + public MonthlyRetentionSchedule() + { + + } + } + /// Monthly retention schedule. + public partial interface IMonthlyRetentionSchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the month.", + SerializedName = @"daysOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] RetentionScheduleDailyDaysOfTheMonth { get; set; } + /// Retention schedule format type for monthly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention schedule format type for monthly retention policy.", + SerializedName = @"retentionScheduleFormatType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? RetentionScheduleFormatType { get; set; } + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the week.", + SerializedName = @"daysOfTheWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] RetentionScheduleWeeklyDaysOfTheWeek { get; set; } + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of weeks of month.", + SerializedName = @"weeksOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] RetentionScheduleWeeklyWeeksOfTheMonth { get; set; } + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention times of retention policy.", + SerializedName = @"retentionTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] RetentionTime { get; set; } + + } + /// Monthly retention schedule. + internal partial interface IMonthlyRetentionScheduleInternal + + { + /// Retention duration of retention Policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + /// Daily retention format for monthly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat RetentionScheduleDaily { get; set; } + /// List of days of the month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] RetentionScheduleDailyDaysOfTheMonth { get; set; } + /// Retention schedule format type for monthly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? RetentionScheduleFormatType { get; set; } + /// Weekly retention format for monthly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat RetentionScheduleWeekly { get; set; } + /// List of days of the week. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] RetentionScheduleWeeklyDaysOfTheWeek { get; set; } + /// List of weeks of month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] RetentionScheduleWeeklyWeeksOfTheMonth { get; set; } + /// Retention times of retention policy. + global::System.DateTime[] RetentionTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MonthlyRetentionSchedule.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MonthlyRetentionSchedule.json.cs new file mode 100644 index 000000000000..f479129ad9a2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MonthlyRetentionSchedule.json.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Monthly retention schedule. + public partial class MonthlyRetentionSchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionSchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionSchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMonthlyRetentionSchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MonthlyRetentionSchedule(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MonthlyRetentionSchedule(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_retentionScheduleDaily = If( json?.PropertyT("retentionScheduleDaily"), out var __jsonRetentionScheduleDaily) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailyRetentionFormat.FromJson(__jsonRetentionScheduleDaily) : RetentionScheduleDaily;} + {_retentionScheduleWeekly = If( json?.PropertyT("retentionScheduleWeekly"), out var __jsonRetentionScheduleWeekly) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklyRetentionFormat.FromJson(__jsonRetentionScheduleWeekly) : RetentionScheduleWeekly;} + {_retentionDuration = If( json?.PropertyT("retentionDuration"), out var __jsonRetentionDuration) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration.FromJson(__jsonRetentionDuration) : RetentionDuration;} + {_retentionScheduleFormatType = If( json?.PropertyT("retentionScheduleFormatType"), out var __jsonRetentionScheduleFormatType) ? (string)__jsonRetentionScheduleFormatType : (string)RetentionScheduleFormatType;} + {_retentionTime = If( json?.PropertyT("retentionTimes"), out var __jsonRetentionTimes) ? If( __jsonRetentionTimes as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(global::System.DateTime) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? global::System.DateTime.TryParse((string)__t, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __tValue) ? __tValue : default(global::System.DateTime) : default(global::System.DateTime))) ))() : null : RetentionTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._retentionScheduleDaily ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionScheduleDaily.ToJson(null,serializationMode) : null, "retentionScheduleDaily" ,container.Add ); + AddIf( null != this._retentionScheduleWeekly ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionScheduleWeekly.ToJson(null,serializationMode) : null, "retentionScheduleWeekly" ,container.Add ); + AddIf( null != this._retentionDuration ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionDuration.ToJson(null,serializationMode) : null, "retentionDuration" ,container.Add ); + AddIf( null != (((object)this._retentionScheduleFormatType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._retentionScheduleFormatType.ToString()) : null, "retentionScheduleFormatType" ,container.Add ); + if (null != this._retentionTime) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._retentionTime ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) ,__w.Add); + } + container.Add("retentionTimes",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MoveRpAcrossTiersRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MoveRpAcrossTiersRequest.cs new file mode 100644 index 000000000000..00c0eb0198bc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MoveRpAcrossTiersRequest.cs @@ -0,0 +1,82 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class MoveRpAcrossTiersRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMoveRpAcrossTiersRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMoveRpAcrossTiersRequestInternal + { + + /// Backing field for property. + private string _objectType; + + /// Gets the class type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? _sourceTierType; + + /// Source tier from where RP needs to be moved + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? SourceTierType { get => this._sourceTierType; set => this._sourceTierType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? _targetTierType; + + /// Target tier where RP needs to be moved + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? TargetTierType { get => this._targetTierType; set => this._targetTierType = value; } + + /// Creates an new instance. + public MoveRpAcrossTiersRequest() + { + + } + } + public partial interface IMoveRpAcrossTiersRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Gets the class type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the class type.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + /// Source tier from where RP needs to be moved + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source tier from where RP needs to be moved", + SerializedName = @"sourceTierType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? SourceTierType { get; set; } + /// Target tier where RP needs to be moved + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Target tier where RP needs to be moved", + SerializedName = @"targetTierType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? TargetTierType { get; set; } + + } + internal partial interface IMoveRpAcrossTiersRequestInternal + + { + /// Gets the class type. + string ObjectType { get; set; } + /// Source tier from where RP needs to be moved + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? SourceTierType { get; set; } + /// Target tier where RP needs to be moved + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? TargetTierType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MoveRpAcrossTiersRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MoveRpAcrossTiersRequest.json.cs new file mode 100644 index 000000000000..f9edebb2f2b9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/MoveRpAcrossTiersRequest.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class MoveRpAcrossTiersRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMoveRpAcrossTiersRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMoveRpAcrossTiersRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMoveRpAcrossTiersRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new MoveRpAcrossTiersRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal MoveRpAcrossTiersRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + {_sourceTierType = If( json?.PropertyT("sourceTierType"), out var __jsonSourceTierType) ? (string)__jsonSourceTierType : (string)SourceTierType;} + {_targetTierType = If( json?.PropertyT("targetTierType"), out var __jsonTargetTierType) ? (string)__jsonTargetTierType : (string)TargetTierType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AddIf( null != (((object)this._sourceTierType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceTierType.ToString()) : null, "sourceTierType" ,container.Add ); + AddIf( null != (((object)this._targetTierType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetTierType.ToString()) : null, "targetTierType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NameInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NameInfo.cs new file mode 100644 index 000000000000..a23e913373fb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NameInfo.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The name of usage. + public partial class NameInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfoInternal + { + + /// Backing field for property. + private string _localizedValue; + + /// Localized value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LocalizedValue { get => this._localizedValue; set => this._localizedValue = value; } + + /// Backing field for property. + private string _value; + + /// Value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public NameInfo() + { + + } + } + /// The name of usage. + public partial interface INameInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Localized value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Localized value of usage.", + SerializedName = @"localizedValue", + PossibleTypes = new [] { typeof(string) })] + string LocalizedValue { get; set; } + /// Value of usage. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value of usage.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// The name of usage. + internal partial interface INameInfoInternal + + { + /// Localized value of usage. + string LocalizedValue { get; set; } + /// Value of usage. + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NameInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NameInfo.json.cs new file mode 100644 index 000000000000..08d8b80552cc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NameInfo.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The name of usage. + public partial class NameInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INameInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new NameInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal NameInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + {_localizedValue = If( json?.PropertyT("localizedValue"), out var __jsonLocalizedValue) ? (string)__jsonLocalizedValue : (string)LocalizedValue;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AddIf( null != (((object)this._localizedValue)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._localizedValue.ToString()) : null, "localizedValue" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponse.cs new file mode 100644 index 000000000000..725a0adef6f2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponse.cs @@ -0,0 +1,131 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The resource management error response. + public partial class NewErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseError _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponseError()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseError Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponseError()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal)Error).Target; } + + /// Creates an new instance. + public NewErrorResponse() + { + + } + } + /// The resource management error response. + public partial interface INewErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The resource management error response. + internal partial interface INewErrorResponseInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse[] Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseError Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponse.json.cs new file mode 100644 index 000000000000..c406228165a1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponse.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The resource management error response. + public partial class NewErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new NewErrorResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal NewErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponseError.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponseError.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponseError.cs new file mode 100644 index 000000000000..da1c81a4465e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponseError.cs @@ -0,0 +1,134 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The error object. + public partial class NewErrorResponseError : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseError, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse[] _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse[] Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseErrorInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public NewErrorResponseError() + { + + } + } + /// The error object. + public partial interface INewErrorResponseError : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error object. + internal partial interface INewErrorResponseErrorInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse[] Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponseError.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponseError.json.cs new file mode 100644 index 000000000000..43182f475394 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/NewErrorResponseError.json.cs @@ -0,0 +1,147 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The error object. + public partial class NewErrorResponseError + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseError. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseError. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponseError FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new NewErrorResponseError(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal NewErrorResponseError(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.INewErrorResponse) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(__u) )) ))() : null : Detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfo.cs new file mode 100644 index 000000000000..a587f981f112 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfo.cs @@ -0,0 +1,76 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation result info. + public partial class OperationResultInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase __operationResultInfoBase = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationResultInfoBase(); + + /// Backing field for property. + private string[] _jobList; + + /// List of jobs created by this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] JobList { get => this._jobList; set => this._jobList = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseInternal)__operationResultInfoBase).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseInternal)__operationResultInfoBase).ObjectType = value ; } + + /// Creates an new instance. + public OperationResultInfo() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__operationResultInfoBase), __operationResultInfoBase); + await eventListener.AssertObjectIsValid(nameof(__operationResultInfoBase), __operationResultInfoBase); + } + } + /// Operation result info. + public partial interface IOperationResultInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase + { + /// List of jobs created by this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of jobs created by this operation.", + SerializedName = @"jobList", + PossibleTypes = new [] { typeof(string) })] + string[] JobList { get; set; } + + } + /// Operation result info. + internal partial interface IOperationResultInfoInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseInternal + { + /// List of jobs created by this operation. + string[] JobList { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfo.json.cs new file mode 100644 index 000000000000..1c05a20d3216 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfo.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation result info. + public partial class OperationResultInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationResultInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationResultInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __operationResultInfoBase = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationResultInfoBase(json); + {_jobList = If( json?.PropertyT("jobList"), out var __jsonJobList) ? If( __jsonJobList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : JobList;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __operationResultInfoBase?.ToJson(container, serializationMode); + if (null != this._jobList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._jobList ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("jobList",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBase.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBase.cs new file mode 100644 index 000000000000..a344ac92b7fb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBase.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for operation result info. + public partial class OperationResultInfoBase : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Creates an new instance. + public OperationResultInfoBase() + { + + } + } + /// Base class for operation result info. + public partial interface IOperationResultInfoBase : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Base class for operation result info. + internal partial interface IOperationResultInfoBaseInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBase.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBase.json.cs new file mode 100644 index 000000000000..b06f86289e85 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBase.json.cs @@ -0,0 +1,127 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for operation result info. + public partial class OperationResultInfoBase + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "ExportJobsOperationResultInfo": + { + return new ExportJobsOperationResultInfo(json); + } + case "OperationResultInfo": + { + return new OperationResultInfo(json); + } + } + return new OperationResultInfoBase(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationResultInfoBase(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBaseResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBaseResource.cs new file mode 100644 index 000000000000..d56f49292c16 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBaseResource.cs @@ -0,0 +1,93 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for operation result info. + public partial class OperationResultInfoBaseResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponse __operationWorkerResponse = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationWorkerResponse(); + + /// HTTP headers associated with this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders Header { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseInternal)__operationWorkerResponse).Header; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseInternal)__operationWorkerResponse).Header = value ?? null /* model class */; } + + /// Internal Acessors for Operation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseResourceInternal.Operation { get => (this._operation = this._operation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationResultInfoBase()); set { {_operation = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase _operation; + + /// OperationResultInfoBaseResource operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase Operation { get => (this._operation = this._operation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationResultInfoBase()); set => this._operation = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string OperationObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseInternal)Operation).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseInternal)Operation).ObjectType = value ?? null; } + + /// HTTP Status Code of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode? StatusCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseInternal)__operationWorkerResponse).StatusCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseInternal)__operationWorkerResponse).StatusCode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode)""); } + + /// Creates an new instance. + public OperationResultInfoBaseResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__operationWorkerResponse), __operationWorkerResponse); + await eventListener.AssertObjectIsValid(nameof(__operationWorkerResponse), __operationWorkerResponse); + } + } + /// Base class for operation result info. + public partial interface IOperationResultInfoBaseResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponse + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string OperationObjectType { get; set; } + + } + /// Base class for operation result info. + internal partial interface IOperationResultInfoBaseResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseInternal + { + /// OperationResultInfoBaseResource operation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBase Operation { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string OperationObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBaseResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBaseResource.json.cs new file mode 100644 index 000000000000..9a274abac490 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationResultInfoBaseResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for operation result info. + public partial class OperationResultInfoBaseResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationResultInfoBaseResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationResultInfoBaseResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationResultInfoBaseResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __operationWorkerResponse = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationWorkerResponse(json); + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationResultInfoBase.FromJson(__jsonOperation) : Operation;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __operationWorkerResponse?.ToJson(container, serializationMode); + AddIf( null != this._operation ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._operation.ToJson(null,serializationMode) : null, "operation" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatus.cs new file mode 100644 index 000000000000..5fc2c5344682 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatus.cs @@ -0,0 +1,191 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status. + public partial class OperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatus, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusInternal + { + + /// Error code of the operation failure. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusErrorInternal)Error).Code = value ?? null; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// Operation end time. Format: ISO-8601. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusError _error; + + /// Error information related to this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusError()); set => this._error = value; } + + /// Backing field for property. + private string _id; + + /// ID of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Error message displayed if the operation failure. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusErrorInternal)Error).Message = value ?? null; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusError Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusError()); set { {_error = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo()); set { {_property = value;} } } + + /// Backing field for property. + private string _name; + + /// Name of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)Property).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)Property).ObjectType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo _property; + + /// Additional information associated with this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo()); set => this._property = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Operation start time. Format: ISO-8601. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues? _status; + + /// Operation status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public OperationStatus() + { + + } + } + /// Operation status. + public partial interface IOperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code of the operation failure. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error code of the operation failure.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// Operation end time. Format: ISO-8601. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation end time. Format: ISO-8601.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// ID of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the operation.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// Error message displayed if the operation failure. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error message displayed if the operation failure.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Name of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the operation.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + /// Operation start time. Format: ISO-8601. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation start time. Format: ISO-8601.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// Operation status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues? Status { get; set; } + + } + /// Operation status. + internal partial interface IOperationStatusInternal + + { + /// Error code of the operation failure. + string Code { get; set; } + /// Operation end time. Format: ISO-8601. + global::System.DateTime? EndTime { get; set; } + /// Error information related to this operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusError Error { get; set; } + /// ID of the operation. + string Id { get; set; } + /// Error message displayed if the operation failure. + string Message { get; set; } + /// Name of the operation. + string Name { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + /// Additional information associated with this operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo Property { get; set; } + /// Operation start time. Format: ISO-8601. + global::System.DateTime? StartTime { get; set; } + /// Operation status. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues? Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatus.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatus.json.cs new file mode 100644 index 000000000000..104cbcb7eed4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatus.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status. + public partial class OperationStatus + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatus. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatus. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationStatus(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationStatus(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusError.FromJson(__jsonError) : Error;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo.FromJson(__jsonProperties) : Property;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusError.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusError.cs new file mode 100644 index 000000000000..f755a0fd2542 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusError.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Error information associated with operation status call. + public partial class OperationStatusError : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusError, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusErrorInternal + { + + /// Backing field for property. + private string _code; + + /// Error code of the operation failure. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Code { get => this._code; set => this._code = value; } + + /// Backing field for property. + private string _message; + + /// Error message displayed if the operation failure. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Creates an new instance. + public OperationStatusError() + { + + } + } + /// Error information associated with operation status call. + public partial interface IOperationStatusError : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code of the operation failure. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error code of the operation failure.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// Error message displayed if the operation failure. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error message displayed if the operation failure.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + + } + /// Error information associated with operation status call. + internal partial interface IOperationStatusErrorInternal + + { + /// Error code of the operation failure. + string Code { get; set; } + /// Error message displayed if the operation failure. + string Message { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusError.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusError.json.cs new file mode 100644 index 000000000000..767f7b578236 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusError.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Error information associated with operation status call. + public partial class OperationStatusError + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusError. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusError. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusError FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationStatusError(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationStatusError(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusExtendedInfo.cs new file mode 100644 index 000000000000..ea59c55100f6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusExtendedInfo.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for additional information of operation status. + public partial class OperationStatusExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Creates an new instance. + public OperationStatusExtendedInfo() + { + + } + } + /// Base class for additional information of operation status. + public partial interface IOperationStatusExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Base class for additional information of operation status. + internal partial interface IOperationStatusExtendedInfoInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusExtendedInfo.json.cs new file mode 100644 index 000000000000..2a157531c444 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusExtendedInfo.json.cs @@ -0,0 +1,135 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for additional information of operation status. + public partial class OperationStatusExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "OperationStatusJobExtendedInfo": + { + return new OperationStatusJobExtendedInfo(json); + } + case "OperationStatusJobsExtendedInfo": + { + return new OperationStatusJobsExtendedInfo(json); + } + case "OperationStatusProvisionILRExtendedInfo": + { + return new OperationStatusProvisionIlrExtendedInfo(json); + } + case "OperationStatusValidateOperationExtendedInfo": + { + return new OperationStatusValidateOperationExtendedInfo(json); + } + } + return new OperationStatusExtendedInfo(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationStatusExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobExtendedInfo.cs new file mode 100644 index 000000000000..a51c55908475 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobExtendedInfo.cs @@ -0,0 +1,76 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status job extended info. + public partial class OperationStatusJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobExtendedInfoInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo __operationStatusExtendedInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo(); + + /// Backing field for property. + private string _jobId; + + /// ID of the job created for this protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string JobId { get => this._jobId; set => this._jobId = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)__operationStatusExtendedInfo).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)__operationStatusExtendedInfo).ObjectType = value ; } + + /// Creates an new instance. + public OperationStatusJobExtendedInfo() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__operationStatusExtendedInfo), __operationStatusExtendedInfo); + await eventListener.AssertObjectIsValid(nameof(__operationStatusExtendedInfo), __operationStatusExtendedInfo); + } + } + /// Operation status job extended info. + public partial interface IOperationStatusJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo + { + /// ID of the job created for this protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the job created for this protected item.", + SerializedName = @"jobId", + PossibleTypes = new [] { typeof(string) })] + string JobId { get; set; } + + } + /// Operation status job extended info. + internal partial interface IOperationStatusJobExtendedInfoInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal + { + /// ID of the job created for this protected item. + string JobId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobExtendedInfo.json.cs new file mode 100644 index 000000000000..2be57a04825f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobExtendedInfo.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status job extended info. + public partial class OperationStatusJobExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationStatusJobExtendedInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationStatusJobExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __operationStatusExtendedInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo(json); + {_jobId = If( json?.PropertyT("jobId"), out var __jsonJobId) ? (string)__jsonJobId : (string)JobId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __operationStatusExtendedInfo?.ToJson(container, serializationMode); + AddIf( null != (((object)this._jobId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._jobId.ToString()) : null, "jobId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfo.cs new file mode 100644 index 000000000000..8197dfbf621e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfo.cs @@ -0,0 +1,93 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status extended info for list of jobs. + public partial class OperationStatusJobsExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo __operationStatusExtendedInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsError _failedJobsError; + + /// Stores all the failed jobs along with the corresponding error codes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsError FailedJobsError { get => (this._failedJobsError = this._failedJobsError ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusJobsExtendedInfoFailedJobsError()); set => this._failedJobsError = value; } + + /// Backing field for property. + private string[] _jobId; + + /// IDs of the jobs created for the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] JobId { get => this._jobId; set => this._jobId = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)__operationStatusExtendedInfo).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)__operationStatusExtendedInfo).ObjectType = value ; } + + /// Creates an new instance. + public OperationStatusJobsExtendedInfo() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__operationStatusExtendedInfo), __operationStatusExtendedInfo); + await eventListener.AssertObjectIsValid(nameof(__operationStatusExtendedInfo), __operationStatusExtendedInfo); + } + } + /// Operation status extended info for list of jobs. + public partial interface IOperationStatusJobsExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo + { + /// Stores all the failed jobs along with the corresponding error codes. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Stores all the failed jobs along with the corresponding error codes.", + SerializedName = @"failedJobsError", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsError) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsError FailedJobsError { get; set; } + /// IDs of the jobs created for the protected item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"IDs of the jobs created for the protected item.", + SerializedName = @"jobIds", + PossibleTypes = new [] { typeof(string) })] + string[] JobId { get; set; } + + } + /// Operation status extended info for list of jobs. + internal partial interface IOperationStatusJobsExtendedInfoInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal + { + /// Stores all the failed jobs along with the corresponding error codes. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsError FailedJobsError { get; set; } + /// IDs of the jobs created for the protected item. + string[] JobId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfo.json.cs new file mode 100644 index 000000000000..a0d7ae9d50e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfo.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status extended info for list of jobs. + public partial class OperationStatusJobsExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationStatusJobsExtendedInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationStatusJobsExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __operationStatusExtendedInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo(json); + {_jobId = If( json?.PropertyT("jobIds"), out var __jsonJobIds) ? If( __jsonJobIds as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : JobId;} + {_failedJobsError = If( json?.PropertyT("failedJobsError"), out var __jsonFailedJobsError) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusJobsExtendedInfoFailedJobsError.FromJson(__jsonFailedJobsError) : FailedJobsError;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __operationStatusExtendedInfo?.ToJson(container, serializationMode); + if (null != this._jobId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._jobId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("jobIds",__w); + } + AddIf( null != this._failedJobsError ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._failedJobsError.ToJson(null,serializationMode) : null, "failedJobsError" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfoFailedJobsError.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfoFailedJobsError.cs new file mode 100644 index 000000000000..f485c9025d3c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfoFailedJobsError.cs @@ -0,0 +1,37 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Stores all the failed jobs along with the corresponding error codes. + public partial class OperationStatusJobsExtendedInfoFailedJobsError : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsError, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsErrorInternal + { + + /// + /// Creates an new instance. + /// + public OperationStatusJobsExtendedInfoFailedJobsError() + { + + } + } + /// Stores all the failed jobs along with the corresponding error codes. + public partial interface IOperationStatusJobsExtendedInfoFailedJobsError : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Stores all the failed jobs along with the corresponding error codes. + internal partial interface IOperationStatusJobsExtendedInfoFailedJobsErrorInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfoFailedJobsError.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfoFailedJobsError.dictionary.cs new file mode 100644 index 000000000000..f0f38c61e5e2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfoFailedJobsError.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class OperationStatusJobsExtendedInfoFailedJobsError : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusJobsExtendedInfoFailedJobsError source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfoFailedJobsError.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfoFailedJobsError.json.cs new file mode 100644 index 000000000000..475fbb865b97 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusJobsExtendedInfoFailedJobsError.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Stores all the failed jobs along with the corresponding error codes. + public partial class OperationStatusJobsExtendedInfoFailedJobsError + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsError. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsError. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusJobsExtendedInfoFailedJobsError FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationStatusJobsExtendedInfoFailedJobsError(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal OperationStatusJobsExtendedInfoFailedJobsError(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusProvisionIlrExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusProvisionIlrExtendedInfo.cs new file mode 100644 index 000000000000..db19800c50dc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusProvisionIlrExtendedInfo.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status extended info for ILR provision action. + public partial class OperationStatusProvisionIlrExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusProvisionIlrExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusProvisionIlrExtendedInfoInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo __operationStatusExtendedInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo(); + + /// Internal Acessors for RecoveryTarget + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTarget Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusProvisionIlrExtendedInfoInternal.RecoveryTarget { get => (this._recoveryTarget = this._recoveryTarget ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InstantItemRecoveryTarget()); set { {_recoveryTarget = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)__operationStatusExtendedInfo).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)__operationStatusExtendedInfo).ObjectType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTarget _recoveryTarget; + + /// Target details for file / folder restore. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTarget RecoveryTarget { get => (this._recoveryTarget = this._recoveryTarget ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InstantItemRecoveryTarget()); set => this._recoveryTarget = value; } + + /// List of client scripts. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect[] RecoveryTargetClientScript { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTargetInternal)RecoveryTarget).ClientScript; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTargetInternal)RecoveryTarget).ClientScript = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public OperationStatusProvisionIlrExtendedInfo() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__operationStatusExtendedInfo), __operationStatusExtendedInfo); + await eventListener.AssertObjectIsValid(nameof(__operationStatusExtendedInfo), __operationStatusExtendedInfo); + } + } + /// Operation status extended info for ILR provision action. + public partial interface IOperationStatusProvisionIlrExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo + { + /// List of client scripts. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of client scripts.", + SerializedName = @"clientScripts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect[] RecoveryTargetClientScript { get; set; } + + } + /// Operation status extended info for ILR provision action. + internal partial interface IOperationStatusProvisionIlrExtendedInfoInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal + { + /// Target details for file / folder restore. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInstantItemRecoveryTarget RecoveryTarget { get; set; } + /// List of client scripts. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IClientScriptForConnect[] RecoveryTargetClientScript { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusProvisionIlrExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusProvisionIlrExtendedInfo.json.cs new file mode 100644 index 000000000000..5b799d95b107 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusProvisionIlrExtendedInfo.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status extended info for ILR provision action. + public partial class OperationStatusProvisionIlrExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusProvisionIlrExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusProvisionIlrExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusProvisionIlrExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationStatusProvisionIlrExtendedInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationStatusProvisionIlrExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __operationStatusExtendedInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo(json); + {_recoveryTarget = If( json?.PropertyT("recoveryTarget"), out var __jsonRecoveryTarget) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InstantItemRecoveryTarget.FromJson(__jsonRecoveryTarget) : RecoveryTarget;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __operationStatusExtendedInfo?.ToJson(container, serializationMode); + AddIf( null != this._recoveryTarget ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._recoveryTarget.ToJson(null,serializationMode) : null, "recoveryTarget" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusValidateOperationExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusValidateOperationExtendedInfo.cs new file mode 100644 index 000000000000..615577d0fb94 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusValidateOperationExtendedInfo.cs @@ -0,0 +1,87 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status extended info for ValidateOperation action. + public partial class OperationStatusValidateOperationExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusValidateOperationExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusValidateOperationExtendedInfoInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo __operationStatusExtendedInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo(); + + /// Internal Acessors for ValidateOperationResponse + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusValidateOperationExtendedInfoInternal.ValidateOperationResponse { get => (this._validateOperationResponse = this._validateOperationResponse ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationResponse()); set { {_validateOperationResponse = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)__operationStatusExtendedInfo).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal)__operationStatusExtendedInfo).ObjectType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse _validateOperationResponse; + + /// Gets the validation operation response + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse ValidateOperationResponse { get => (this._validateOperationResponse = this._validateOperationResponse ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationResponse()); set => this._validateOperationResponse = value; } + + /// Gets the validation result + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] ValidateOperationResponseValidationResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponseInternal)ValidateOperationResponse).ValidationResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponseInternal)ValidateOperationResponse).ValidationResult = value ?? null /* arrayOf */; } + + /// + /// Creates an new instance. + /// + public OperationStatusValidateOperationExtendedInfo() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__operationStatusExtendedInfo), __operationStatusExtendedInfo); + await eventListener.AssertObjectIsValid(nameof(__operationStatusExtendedInfo), __operationStatusExtendedInfo); + } + } + /// Operation status extended info for ValidateOperation action. + public partial interface IOperationStatusValidateOperationExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfo + { + /// Gets the validation result + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the validation result", + SerializedName = @"validationResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] ValidateOperationResponseValidationResult { get; set; } + + } + /// Operation status extended info for ValidateOperation action. + internal partial interface IOperationStatusValidateOperationExtendedInfoInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusExtendedInfoInternal + { + /// Gets the validation operation response + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse ValidateOperationResponse { get; set; } + /// Gets the validation result + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] ValidateOperationResponseValidationResult { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusValidateOperationExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusValidateOperationExtendedInfo.json.cs new file mode 100644 index 000000000000..3be7d465cfb4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationStatusValidateOperationExtendedInfo.json.cs @@ -0,0 +1,113 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation status extended info for ValidateOperation action. + public partial class OperationStatusValidateOperationExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusValidateOperationExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusValidateOperationExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationStatusValidateOperationExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationStatusValidateOperationExtendedInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationStatusValidateOperationExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __operationStatusExtendedInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatusExtendedInfo(json); + {_validateOperationResponse = If( json?.PropertyT("validateOperationResponse"), out var __jsonValidateOperationResponse) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationResponse.FromJson(__jsonValidateOperationResponse) : ValidateOperationResponse;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __operationStatusExtendedInfo?.ToJson(container, serializationMode); + AddIf( null != this._validateOperationResponse ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._validateOperationResponse.ToJson(null,serializationMode) : null, "validateOperationResponse" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponse.cs new file mode 100644 index 000000000000..14f69e36ee71 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponse.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// This is the base class for operation result responses. + public partial class OperationWorkerResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders _header; + + /// HTTP headers associated with this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders Header { get => (this._header = this._header ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationWorkerResponseHeaders()); set => this._header = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode? _statusCode; + + /// HTTP Status Code of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode? StatusCode { get => this._statusCode; set => this._statusCode = value; } + + /// Creates an new instance. + public OperationWorkerResponse() + { + + } + } + /// This is the base class for operation result responses. + public partial interface IOperationWorkerResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// HTTP headers associated with this operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"HTTP headers associated with this operation.", + SerializedName = @"headers", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders Header { get; set; } + /// HTTP Status Code of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"HTTP Status Code of the operation.", + SerializedName = @"statusCode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode? StatusCode { get; set; } + + } + /// This is the base class for operation result responses. + internal partial interface IOperationWorkerResponseInternal + + { + /// HTTP headers associated with this operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders Header { get; set; } + /// HTTP Status Code of the operation. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode? StatusCode { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponse.json.cs new file mode 100644 index 000000000000..96ee16116837 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponse.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// This is the base class for operation result responses. + public partial class OperationWorkerResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationWorkerResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal OperationWorkerResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_statusCode = If( json?.PropertyT("statusCode"), out var __jsonStatusCode) ? (string)__jsonStatusCode : (string)StatusCode;} + {_header = If( json?.PropertyT("headers"), out var __jsonHeaders) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationWorkerResponseHeaders.FromJson(__jsonHeaders) : Header;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._statusCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._statusCode.ToString()) : null, "statusCode" ,container.Add ); + AddIf( null != this._header ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._header.ToJson(null,serializationMode) : null, "headers" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponseHeaders.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponseHeaders.cs new file mode 100644 index 000000000000..45716b6cf315 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponseHeaders.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// HTTP headers associated with this operation. + public partial class OperationWorkerResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeadersInternal + { + + /// Creates an new instance. + public OperationWorkerResponseHeaders() + { + + } + } + /// HTTP headers associated with this operation. + public partial interface IOperationWorkerResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// HTTP headers associated with this operation. + internal partial interface IOperationWorkerResponseHeadersInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponseHeaders.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponseHeaders.dictionary.cs new file mode 100644 index 000000000000..724a967c5115 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponseHeaders.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class OperationWorkerResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string[] this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string[] value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string[] value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationWorkerResponseHeaders source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponseHeaders.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponseHeaders.json.cs new file mode 100644 index 000000000000..f96fc62b3f54 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/OperationWorkerResponseHeaders.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// HTTP headers associated with this operation. + public partial class OperationWorkerResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IOperationWorkerResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new OperationWorkerResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal OperationWorkerResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PointInTimeRange.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PointInTimeRange.cs new file mode 100644 index 000000000000..85e2ff24100b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PointInTimeRange.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Provides details for log ranges + public partial class PointInTimeRange : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRangeInternal + { + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// End time of the time range for log recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Start time of the time range for log recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Creates an new instance. + public PointInTimeRange() + { + + } + } + /// Provides details for log ranges + public partial interface IPointInTimeRange : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// End time of the time range for log recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"End time of the time range for log recovery.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// Start time of the time range for log recovery. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Start time of the time range for log recovery.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + + } + /// Provides details for log ranges + internal partial interface IPointInTimeRangeInternal + + { + /// End time of the time range for log recovery. + global::System.DateTime? EndTime { get; set; } + /// Start time of the time range for log recovery. + global::System.DateTime? StartTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PointInTimeRange.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PointInTimeRange.json.cs new file mode 100644 index 000000000000..c77899d9a896 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PointInTimeRange.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Provides details for log ranges + public partial class PointInTimeRange + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPointInTimeRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PointInTimeRange(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PointInTimeRange(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreBackupValidation.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreBackupValidation.cs new file mode 100644 index 000000000000..6115881ac98e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreBackupValidation.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Pre-backup validation for Azure VM Workload provider. + public partial class PreBackupValidation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidationInternal + { + + /// Backing field for property. + private string _code; + + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Code { get => this._code; set => this._code = value; } + + /// Backing field for property. + private string _message; + + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? _status; + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public PreBackupValidation() + { + + } + } + /// Pre-backup validation for Azure VM Workload provider. + public partial interface IPreBackupValidation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code of protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error code of protectable item", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// Message corresponding to the error code for the protectable item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Message corresponding to the error code for the protectable item", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of protectable item, i.e. InProgress,Succeeded,Failed", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? Status { get; set; } + + } + /// Pre-backup validation for Azure VM Workload provider. + internal partial interface IPreBackupValidationInternal + + { + /// Error code of protectable item + string Code { get; set; } + /// Message corresponding to the error code for the protectable item + string Message { get; set; } + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreBackupValidation.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreBackupValidation.json.cs new file mode 100644 index 000000000000..99cc412fc376 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreBackupValidation.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Pre-backup validation for Azure VM Workload provider. + public partial class PreBackupValidation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreBackupValidation FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PreBackupValidation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PreBackupValidation(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupRequest.cs new file mode 100644 index 000000000000..f9b0345e9308 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupRequest.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. + /// It will validate followings + /// 1. Vault capacity + /// 2. VM is already protected + /// 3. Any VM related configuration passed in properties. + /// + public partial class PreValidateEnableBackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupRequestInternal + { + + /// Backing field for property. + private string _property; + + /// Configuration of VM if any needs to be validated like OS type etc + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Property { get => this._property; set => this._property = value; } + + /// Backing field for property. + private string _resourceId; + + /// ARM Virtual Machine Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceId { get => this._resourceId; set => this._resourceId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? _resourceType; + + /// ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? ResourceType { get => this._resourceType; set => this._resourceType = value; } + + /// Backing field for property. + private string _vaultId; + + /// ARM id of the Recovery Services Vault + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VaultId { get => this._vaultId; set => this._vaultId = value; } + + /// Creates an new instance. + public PreValidateEnableBackupRequest() + { + + } + } + /// Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. + /// It will validate followings + /// 1. Vault capacity + /// 2. VM is already protected + /// 3. Any VM related configuration passed in properties. + public partial interface IPreValidateEnableBackupRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Configuration of VM if any needs to be validated like OS type etc + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Configuration of VM if any needs to be validated like OS type etc", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(string) })] + string Property { get; set; } + /// ARM Virtual Machine Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM Virtual Machine Id", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; set; } + /// ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc", + SerializedName = @"resourceType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? ResourceType { get; set; } + /// ARM id of the Recovery Services Vault + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM id of the Recovery Services Vault", + SerializedName = @"vaultId", + PossibleTypes = new [] { typeof(string) })] + string VaultId { get; set; } + + } + /// Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. + /// It will validate followings + /// 1. Vault capacity + /// 2. VM is already protected + /// 3. Any VM related configuration passed in properties. + internal partial interface IPreValidateEnableBackupRequestInternal + + { + /// Configuration of VM if any needs to be validated like OS type etc + string Property { get; set; } + /// ARM Virtual Machine Id + string ResourceId { get; set; } + /// ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? ResourceType { get; set; } + /// ARM id of the Recovery Services Vault + string VaultId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupRequest.json.cs new file mode 100644 index 000000000000..3f9ddc47daa5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupRequest.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. + /// It will validate followings + /// 1. Vault capacity + /// 2. VM is already protected + /// 3. Any VM related configuration passed in properties. + /// + public partial class PreValidateEnableBackupRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PreValidateEnableBackupRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PreValidateEnableBackupRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceType = If( json?.PropertyT("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)ResourceType;} + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} + {_vaultId = If( json?.PropertyT("vaultId"), out var __jsonVaultId) ? (string)__jsonVaultId : (string)VaultId;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? (string)__jsonProperties : (string)Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType" ,container.Add ); + AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); + AddIf( null != (((object)this._vaultId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._vaultId.ToString()) : null, "vaultId" ,container.Add ); + AddIf( null != (((object)this._property)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._property.ToString()) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupResponse.cs new file mode 100644 index 000000000000..919a69a671e1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupResponse.cs @@ -0,0 +1,152 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response contract for enable backup validation request + public partial class PreValidateEnableBackupResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupResponseInternal + { + + /// Backing field for property. + private string _containerName; + + /// + /// Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + /// for portal + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// Backing field for property. + private string _errorCode; + + /// Response error code + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorCode { get => this._errorCode; set => this._errorCode = value; } + + /// Backing field for property. + private string _errorMessage; + + /// Response error message + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorMessage { get => this._errorMessage; set => this._errorMessage = value; } + + /// Backing field for property. + private string _protectedItemName; + + /// + /// Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectedItemName { get => this._protectedItemName; set => this._protectedItemName = value; } + + /// Backing field for property. + private string _recommendation; + + /// Recommended action for user + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Recommendation { get => this._recommendation; set => this._recommendation = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus? _status; + + /// Validation Status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public PreValidateEnableBackupResponse() + { + + } + } + /// Response contract for enable backup validation request + public partial interface IPreValidateEnableBackupResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + /// for portal + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + for portal", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// Response error code + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Response error code", + SerializedName = @"errorCode", + PossibleTypes = new [] { typeof(string) })] + string ErrorCode { get; set; } + /// Response error message + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Response error message", + SerializedName = @"errorMessage", + PossibleTypes = new [] { typeof(string) })] + string ErrorMessage { get; set; } + /// + /// Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal", + SerializedName = @"protectedItemName", + PossibleTypes = new [] { typeof(string) })] + string ProtectedItemName { get; set; } + /// Recommended action for user + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Recommended action for user", + SerializedName = @"recommendation", + PossibleTypes = new [] { typeof(string) })] + string Recommendation { get; set; } + /// Validation Status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Validation Status", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus? Status { get; set; } + + } + /// Response contract for enable backup validation request + internal partial interface IPreValidateEnableBackupResponseInternal + + { + /// + /// Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + /// for portal + /// + string ContainerName { get; set; } + /// Response error code + string ErrorCode { get; set; } + /// Response error message + string ErrorMessage { get; set; } + /// + /// Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal + /// + string ProtectedItemName { get; set; } + /// Recommended action for user + string Recommendation { get; set; } + /// Validation Status + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupResponse.json.cs new file mode 100644 index 000000000000..8a7a415750af --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PreValidateEnableBackupResponse.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response contract for enable backup validation request + public partial class PreValidateEnableBackupResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PreValidateEnableBackupResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PreValidateEnableBackupResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_errorCode = If( json?.PropertyT("errorCode"), out var __jsonErrorCode) ? (string)__jsonErrorCode : (string)ErrorCode;} + {_errorMessage = If( json?.PropertyT("errorMessage"), out var __jsonErrorMessage) ? (string)__jsonErrorMessage : (string)ErrorMessage;} + {_recommendation = If( json?.PropertyT("recommendation"), out var __jsonRecommendation) ? (string)__jsonRecommendation : (string)Recommendation;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_protectedItemName = If( json?.PropertyT("protectedItemName"), out var __jsonProtectedItemName) ? (string)__jsonProtectedItemName : (string)ProtectedItemName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._errorCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorCode.ToString()) : null, "errorCode" ,container.Add ); + AddIf( null != (((object)this._errorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorMessage.ToString()) : null, "errorMessage" ,container.Add ); + AddIf( null != (((object)this._recommendation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recommendation.ToString()) : null, "recommendation" ,container.Add ); + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != (((object)this._protectedItemName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectedItemName.ToString()) : null, "protectedItemName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveRequest.cs new file mode 100644 index 000000000000..c2ef30e27da5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveRequest.cs @@ -0,0 +1,129 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Prepare DataMove Request + public partial class PrepareDataMoveRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveRequestInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel _dataMoveLevel; + + /// DataMove Level + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel DataMoveLevel { get => this._dataMoveLevel; set => this._dataMoveLevel = value; } + + /// Backing field for property. + private bool? _ignoreMoved; + + /// Ignore the artifacts which are already moved. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IgnoreMoved { get => this._ignoreMoved; set => this._ignoreMoved = value; } + + /// Backing field for property. + private string[] _sourceContainerArmId; + + /// + /// Source Container ArmIds + /// This needs to be populated only if DataMoveLevel is set to container + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] SourceContainerArmId { get => this._sourceContainerArmId; set => this._sourceContainerArmId = value; } + + /// Backing field for property. + private string _targetRegion; + + /// Target Region + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetRegion { get => this._targetRegion; set => this._targetRegion = value; } + + /// Backing field for property. + private string _targetResourceId; + + /// ARM Id of target vault + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetResourceId { get => this._targetResourceId; set => this._targetResourceId = value; } + + /// Creates an new instance. + public PrepareDataMoveRequest() + { + + } + } + /// Prepare DataMove Request + public partial interface IPrepareDataMoveRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// DataMove Level + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DataMove Level", + SerializedName = @"dataMoveLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel DataMoveLevel { get; set; } + /// Ignore the artifacts which are already moved. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Ignore the artifacts which are already moved.", + SerializedName = @"ignoreMoved", + PossibleTypes = new [] { typeof(bool) })] + bool? IgnoreMoved { get; set; } + /// + /// Source Container ArmIds + /// This needs to be populated only if DataMoveLevel is set to container + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Container ArmIds + This needs to be populated only if DataMoveLevel is set to container", + SerializedName = @"sourceContainerArmIds", + PossibleTypes = new [] { typeof(string) })] + string[] SourceContainerArmId { get; set; } + /// Target Region + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Target Region", + SerializedName = @"targetRegion", + PossibleTypes = new [] { typeof(string) })] + string TargetRegion { get; set; } + /// ARM Id of target vault + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"ARM Id of target vault", + SerializedName = @"targetResourceId", + PossibleTypes = new [] { typeof(string) })] + string TargetResourceId { get; set; } + + } + /// Prepare DataMove Request + internal partial interface IPrepareDataMoveRequestInternal + + { + /// DataMove Level + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel DataMoveLevel { get; set; } + /// Ignore the artifacts which are already moved. + bool? IgnoreMoved { get; set; } + /// + /// Source Container ArmIds + /// This needs to be populated only if DataMoveLevel is set to container + /// + string[] SourceContainerArmId { get; set; } + /// Target Region + string TargetRegion { get; set; } + /// ARM Id of target vault + string TargetResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveRequest.json.cs new file mode 100644 index 000000000000..4e6f75c789d7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveRequest.json.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Prepare DataMove Request + public partial class PrepareDataMoveRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PrepareDataMoveRequest(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PrepareDataMoveRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_targetResourceId = If( json?.PropertyT("targetResourceId"), out var __jsonTargetResourceId) ? (string)__jsonTargetResourceId : (string)TargetResourceId;} + {_targetRegion = If( json?.PropertyT("targetRegion"), out var __jsonTargetRegion) ? (string)__jsonTargetRegion : (string)TargetRegion;} + {_dataMoveLevel = If( json?.PropertyT("dataMoveLevel"), out var __jsonDataMoveLevel) ? (string)__jsonDataMoveLevel : (string)DataMoveLevel;} + {_sourceContainerArmId = If( json?.PropertyT("sourceContainerArmIds"), out var __jsonSourceContainerArmIds) ? If( __jsonSourceContainerArmIds as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : SourceContainerArmId;} + {_ignoreMoved = If( json?.PropertyT("ignoreMoved"), out var __jsonIgnoreMoved) ? (bool?)__jsonIgnoreMoved : IgnoreMoved;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._targetResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetResourceId.ToString()) : null, "targetResourceId" ,container.Add ); + AddIf( null != (((object)this._targetRegion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetRegion.ToString()) : null, "targetRegion" ,container.Add ); + AddIf( null != (((object)this._dataMoveLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dataMoveLevel.ToString()) : null, "dataMoveLevel" ,container.Add ); + if (null != this._sourceContainerArmId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._sourceContainerArmId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("sourceContainerArmIds",__w); + } + AddIf( null != this._ignoreMoved ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._ignoreMoved) : null, "ignoreMoved" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponse.cs new file mode 100644 index 000000000000..3ac260426d57 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponse.cs @@ -0,0 +1,93 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Prepare DataMove Response + public partial class PrepareDataMoveResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponse __vaultStorageConfigOperationResultResponse = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultStorageConfigOperationResultResponse(); + + /// Backing field for property. + private string _correlationId; + + /// Co-relationId for move operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string CorrelationId { get => this._correlationId; set => this._correlationId = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponseInternal)__vaultStorageConfigOperationResultResponse).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponseInternal)__vaultStorageConfigOperationResultResponse).ObjectType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultProperties _sourceVaultProperty; + + /// Source Vault Properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultProperties SourceVaultProperty { get => (this._sourceVaultProperty = this._sourceVaultProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrepareDataMoveResponseSourceVaultProperties()); set => this._sourceVaultProperty = value; } + + /// Creates an new instance. + public PrepareDataMoveResponse() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__vaultStorageConfigOperationResultResponse), __vaultStorageConfigOperationResultResponse); + await eventListener.AssertObjectIsValid(nameof(__vaultStorageConfigOperationResultResponse), __vaultStorageConfigOperationResultResponse); + } + } + /// Prepare DataMove Response + public partial interface IPrepareDataMoveResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponse + { + /// Co-relationId for move operation + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Co-relationId for move operation", + SerializedName = @"correlationId", + PossibleTypes = new [] { typeof(string) })] + string CorrelationId { get; set; } + /// Source Vault Properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Vault Properties", + SerializedName = @"sourceVaultProperties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultProperties SourceVaultProperty { get; set; } + + } + /// Prepare DataMove Response + internal partial interface IPrepareDataMoveResponseInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponseInternal + { + /// Co-relationId for move operation + string CorrelationId { get; set; } + /// Source Vault Properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultProperties SourceVaultProperty { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponse.json.cs new file mode 100644 index 000000000000..1599141b7568 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponse.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Prepare DataMove Response + public partial class PrepareDataMoveResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PrepareDataMoveResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PrepareDataMoveResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __vaultStorageConfigOperationResultResponse = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultStorageConfigOperationResultResponse(json); + {_correlationId = If( json?.PropertyT("correlationId"), out var __jsonCorrelationId) ? (string)__jsonCorrelationId : (string)CorrelationId;} + {_sourceVaultProperty = If( json?.PropertyT("sourceVaultProperties"), out var __jsonSourceVaultProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrepareDataMoveResponseSourceVaultProperties.FromJson(__jsonSourceVaultProperties) : SourceVaultProperty;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __vaultStorageConfigOperationResultResponse?.ToJson(container, serializationMode); + AddIf( null != (((object)this._correlationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._correlationId.ToString()) : null, "correlationId" ,container.Add ); + AddIf( null != this._sourceVaultProperty ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._sourceVaultProperty.ToJson(null,serializationMode) : null, "sourceVaultProperties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponseSourceVaultProperties.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponseSourceVaultProperties.cs new file mode 100644 index 000000000000..9765904fe8a0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponseSourceVaultProperties.cs @@ -0,0 +1,37 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Source Vault Properties + public partial class PrepareDataMoveResponseSourceVaultProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultProperties, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultPropertiesInternal + { + + /// + /// Creates an new instance. + /// + public PrepareDataMoveResponseSourceVaultProperties() + { + + } + } + /// Source Vault Properties + public partial interface IPrepareDataMoveResponseSourceVaultProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Source Vault Properties + internal partial interface IPrepareDataMoveResponseSourceVaultPropertiesInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponseSourceVaultProperties.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponseSourceVaultProperties.dictionary.cs new file mode 100644 index 000000000000..8e3f6062c47c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponseSourceVaultProperties.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class PrepareDataMoveResponseSourceVaultProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrepareDataMoveResponseSourceVaultProperties source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponseSourceVaultProperties.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponseSourceVaultProperties.json.cs new file mode 100644 index 000000000000..4f7b90eeb2e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrepareDataMoveResponseSourceVaultProperties.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Source Vault Properties + public partial class PrepareDataMoveResponseSourceVaultProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveResponseSourceVaultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PrepareDataMoveResponseSourceVaultProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal PrepareDataMoveResponseSourceVaultProperties(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpoint.cs new file mode 100644 index 000000000000..55449349ab6a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpoint.cs @@ -0,0 +1,53 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// The Private Endpoint network resource that is linked to the Private Endpoint connection + /// + public partial class PrivateEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointInternal + { + + /// Backing field for property. + private string _id; + + /// Gets or sets id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Creates an new instance. + public PrivateEndpoint() + { + + } + } + /// The Private Endpoint network resource that is linked to the Private Endpoint connection + public partial interface IPrivateEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Gets or sets id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets id", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + } + /// The Private Endpoint network resource that is linked to the Private Endpoint connection + internal partial interface IPrivateEndpointInternal + + { + /// Gets or sets id + string Id { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpoint.json.cs new file mode 100644 index 000000000000..3b6452fe8f83 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpoint.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// The Private Endpoint network resource that is linked to the Private Endpoint connection + /// + public partial class PrivateEndpoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PrivateEndpoint(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateEndpoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnection.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnection.cs new file mode 100644 index 000000000000..73536ecdac0a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnection.cs @@ -0,0 +1,148 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Private Endpoint Connection Response Properties + public partial class PrivateEndpointConnection : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnection, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType[] _groupId; + + /// Group Ids for the Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType[] GroupId { get => this._groupId; set => this._groupId = value; } + + /// Internal Acessors for PrivateEndpoint + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateEndpoint()); set { {_privateEndpoint = value;} } } + + /// Internal Acessors for PrivateLinkServiceConnectionState + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateLinkServiceConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint _privateEndpoint; + + /// Gets or sets private endpoint associated with the private endpoint connection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateEndpoint()); set => this._privateEndpoint = value; } + + /// Gets or sets id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointInternal)PrivateEndpoint).Id = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState _privateLinkServiceConnectionState; + + /// Gets or sets private link service connection state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateLinkServiceConnectionState()); set => this._privateLinkServiceConnectionState = value; } + + /// Gets or sets actions required + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PrivateLinkServiceConnectionStateActionsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).ActionsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).ActionsRequired = value ?? null; } + + /// Gets or sets description + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } + + /// Gets or sets the status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState? _provisioningState; + + /// Gets or sets provisioning state of the private endpoint connection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; } + + /// Creates an new instance. + public PrivateEndpointConnection() + { + + } + } + /// Private Endpoint Connection Response Properties + public partial interface IPrivateEndpointConnection : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Group Ids for the Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Group Ids for the Private Endpoint", + SerializedName = @"groupIds", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType[] GroupId { get; set; } + /// Gets or sets id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets id", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointId { get; set; } + /// Gets or sets actions required + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets actions required", + SerializedName = @"actionsRequired", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkServiceConnectionStateActionsRequired { get; set; } + /// Gets or sets description + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets description", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkServiceConnectionStateDescription { get; set; } + /// Gets or sets the status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the status", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + /// Gets or sets provisioning state of the private endpoint connection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets provisioning state of the private endpoint connection", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState? ProvisioningState { get; set; } + + } + /// Private Endpoint Connection Response Properties + internal partial interface IPrivateEndpointConnectionInternal + + { + /// Group Ids for the Private Endpoint + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType[] GroupId { get; set; } + /// Gets or sets private endpoint associated with the private endpoint connection + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint PrivateEndpoint { get; set; } + /// Gets or sets id + string PrivateEndpointId { get; set; } + /// Gets or sets private link service connection state + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + /// Gets or sets actions required + string PrivateLinkServiceConnectionStateActionsRequired { get; set; } + /// Gets or sets description + string PrivateLinkServiceConnectionStateDescription { get; set; } + /// Gets or sets the status + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + /// Gets or sets provisioning state of the private endpoint connection + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnection.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnection.json.cs new file mode 100644 index 000000000000..93d63f2e53c7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnection.json.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Private Endpoint Connection Response Properties + public partial class PrivateEndpointConnection + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PrivateEndpointConnection(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateEndpointConnection(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : PrivateEndpoint;} + {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateLinkServiceConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : PrivateLinkServiceConnectionState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_groupId = If( json?.PropertyT("groupIds"), out var __jsonGroupIds) ? If( __jsonGroupIds as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType)""))) ))() : null : GroupId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._privateEndpoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._privateEndpoint.ToJson(null,serializationMode) : null, "privateEndpoint" ,container.Add ); + AddIf( null != this._privateLinkServiceConnectionState ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._privateLinkServiceConnectionState.ToJson(null,serializationMode) : null, "privateLinkServiceConnectionState" ,container.Add ); + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + if (null != this._groupId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._groupId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("groupIds",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnectionResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnectionResource.cs new file mode 100644 index 000000000000..4fcc40853f87 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnectionResource.cs @@ -0,0 +1,194 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Private Endpoint Connection Response Properties + public partial class PrivateEndpointConnectionResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Group Ids for the Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType[] GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).GroupId = value ?? null /* arrayOf */; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for PrivateEndpoint + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResourceInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateEndpoint = value; } + + /// Internal Acessors for PrivateLinkServiceConnectionState + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResourceInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateLinkServiceConnectionState = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnection Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateEndpointConnection()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Gets or sets id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateEndpointId = value ?? null; } + + /// Gets or sets actions required + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PrivateLinkServiceConnectionStateActionsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateLinkServiceConnectionStateActionsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateLinkServiceConnectionStateActionsRequired = value ?? null; } + + /// Gets or sets description + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } + + /// Gets or sets the status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnection _property; + + /// PrivateEndpointConnectionResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnection Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateEndpointConnection()); set => this._property = value; } + + /// Gets or sets provisioning state of the private endpoint connection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionInternal)Property).ProvisioningState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public PrivateEndpointConnectionResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Private Endpoint Connection Response Properties + public partial interface IPrivateEndpointConnectionResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Group Ids for the Private Endpoint + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Group Ids for the Private Endpoint", + SerializedName = @"groupIds", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType[] GroupId { get; set; } + /// Gets or sets id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets id", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointId { get; set; } + /// Gets or sets actions required + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets actions required", + SerializedName = @"actionsRequired", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkServiceConnectionStateActionsRequired { get; set; } + /// Gets or sets description + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets description", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkServiceConnectionStateDescription { get; set; } + /// Gets or sets the status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the status", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + /// Gets or sets provisioning state of the private endpoint connection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets provisioning state of the private endpoint connection", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState? ProvisioningState { get; set; } + + } + /// Private Endpoint Connection Response Properties + internal partial interface IPrivateEndpointConnectionResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Group Ids for the Private Endpoint + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType[] GroupId { get; set; } + /// Gets or sets private endpoint associated with the private endpoint connection + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpoint PrivateEndpoint { get; set; } + /// Gets or sets id + string PrivateEndpointId { get; set; } + /// Gets or sets private link service connection state + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + /// Gets or sets actions required + string PrivateLinkServiceConnectionStateActionsRequired { get; set; } + /// Gets or sets description + string PrivateLinkServiceConnectionStateDescription { get; set; } + /// Gets or sets the status + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } + /// PrivateEndpointConnectionResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnection Property { get; set; } + /// Gets or sets provisioning state of the private endpoint connection + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnectionResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnectionResource.json.cs new file mode 100644 index 000000000000..acac861c8ee1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateEndpointConnectionResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Private Endpoint Connection Response Properties + public partial class PrivateEndpointConnectionResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateEndpointConnectionResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateEndpointConnection.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateLinkServiceConnectionState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateLinkServiceConnectionState.cs new file mode 100644 index 000000000000..b5b9b7937c17 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateLinkServiceConnectionState.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Private Link Service Connection State + public partial class PrivateLinkServiceConnectionState : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionStateInternal + { + + /// Backing field for property. + private string _actionsRequired; + + /// Gets or sets actions required + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ActionsRequired { get => this._actionsRequired; set => this._actionsRequired = value; } + + /// Backing field for property. + private string _description; + + /// Gets or sets description + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? _status; + + /// Gets or sets the status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public PrivateLinkServiceConnectionState() + { + + } + } + /// Private Link Service Connection State + public partial interface IPrivateLinkServiceConnectionState : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Gets or sets actions required + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets actions required", + SerializedName = @"actionsRequired", + PossibleTypes = new [] { typeof(string) })] + string ActionsRequired { get; set; } + /// Gets or sets description + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets description", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Gets or sets the status + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the status", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? Status { get; set; } + + } + /// Private Link Service Connection State + internal partial interface IPrivateLinkServiceConnectionStateInternal + + { + /// Gets or sets actions required + string ActionsRequired { get; set; } + /// Gets or sets description + string Description { get; set; } + /// Gets or sets the status + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateLinkServiceConnectionState.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateLinkServiceConnectionState.json.cs new file mode 100644 index 000000000000..814979facf7d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/PrivateLinkServiceConnectionState.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Private Link Service Connection State + public partial class PrivateLinkServiceConnectionState + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateLinkServiceConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new PrivateLinkServiceConnectionState(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateLinkServiceConnectionState(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_actionsRequired = If( json?.PropertyT("actionsRequired"), out var __jsonActionsRequired) ? (string)__jsonActionsRequired : (string)ActionsRequired;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != (((object)this._actionsRequired)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._actionsRequired.ToString()) : null, "actionsRequired" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainer.cs new file mode 100644 index 000000000000..037b96cadee6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainer.cs @@ -0,0 +1,133 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Protectable Container Class. + public partial class ProtectableContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private string _containerId; + + /// Fabric Id of the container such as ARM Id. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerId { get => this._containerId; set => this._containerId = value; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Backing field for property. + private string _healthStatus; + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string HealthStatus { get => this._healthStatus; set => this._healthStatus = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType _type; + + /// + /// Type of the container. The value of this property for + /// 1. Compute Azure VM is Microsoft.Compute/virtualMachines + /// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public ProtectableContainer() + { + + } + } + /// Protectable Container Class. + public partial interface IProtectableContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management for the container.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Fabric Id of the container such as ARM Id. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fabric Id of the container such as ARM Id.", + SerializedName = @"containerId", + PossibleTypes = new [] { typeof(string) })] + string ContainerId { get; set; } + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the container.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of health of the container.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(string) })] + string HealthStatus { get; set; } + /// + /// Type of the container. The value of this property for + /// 1. Compute Azure VM is Microsoft.Compute/virtualMachines + /// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Type of the container. The value of this property for + 1. Compute Azure VM is Microsoft.Compute/virtualMachines + 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines", + SerializedName = @"protectableContainerType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType Type { get; set; } + + } + /// Protectable Container Class. + internal partial interface IProtectableContainerInternal + + { + /// Type of backup management for the container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Fabric Id of the container such as ARM Id. + string ContainerId { get; set; } + /// Friendly name of the container. + string FriendlyName { get; set; } + /// Status of health of the container. + string HealthStatus { get; set; } + /// + /// Type of the container. The value of this property for + /// 1. Compute Azure VM is Microsoft.Compute/virtualMachines + /// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainer.json.cs new file mode 100644 index 000000000000..2e7f9b1fc220 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainer.json.cs @@ -0,0 +1,135 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Protectable Container Class. + public partial class ProtectableContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("protectableContainerType") ) + { + case "StorageContainer": + { + return new AzureStorageProtectableContainer(json); + } + case "VMAppContainer": + { + return new AzureVMAppContainerProtectableContainer(json); + } + } + return new ProtectableContainer(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectableContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_type = If( json?.PropertyT("protectableContainerType"), out var __jsonProtectableContainerType) ? (string)__jsonProtectableContainerType : (string)Type;} + {_healthStatus = If( json?.PropertyT("healthStatus"), out var __jsonHealthStatus) ? (string)__jsonHealthStatus : (string)HealthStatus;} + {_containerId = If( json?.PropertyT("containerId"), out var __jsonContainerId) ? (string)__jsonContainerId : (string)ContainerId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + 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, "protectableContainerType" ,container.Add ); + AddIf( null != (((object)this._healthStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._healthStatus.ToString()) : null, "healthStatus" ,container.Add ); + AddIf( null != (((object)this._containerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerId.ToString()) : null, "containerId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResource.cs new file mode 100644 index 000000000000..4a25593f8e19 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResource.cs @@ -0,0 +1,184 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Protectable Container Class. + public partial class ProtectableContainerResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Fabric Id of the container such as ARM Id. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).ContainerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).ContainerId = value ?? null; } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).HealthStatus = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectableContainer()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer _property; + + /// ProtectableContainerResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectableContainer()); set => this._property = value; } + + /// + /// Type of the container. The value of this property for + /// 1. Compute Azure VM is Microsoft.Compute/virtualMachines + /// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType? ProtectableContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerInternal)Property).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProtectableContainerResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Protectable Container Class. + public partial interface IProtectableContainerResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management for the container.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Fabric Id of the container such as ARM Id. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fabric Id of the container such as ARM Id.", + SerializedName = @"containerId", + PossibleTypes = new [] { typeof(string) })] + string ContainerId { get; set; } + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the container.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of health of the container.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(string) })] + string HealthStatus { get; set; } + /// + /// Type of the container. The value of this property for + /// 1. Compute Azure VM is Microsoft.Compute/virtualMachines + /// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the container. The value of this property for + 1. Compute Azure VM is Microsoft.Compute/virtualMachines + 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines", + SerializedName = @"protectableContainerType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType? ProtectableContainerType { get; set; } + + } + /// Protectable Container Class. + internal partial interface IProtectableContainerResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Type of backup management for the container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Fabric Id of the container such as ARM Id. + string ContainerId { get; set; } + /// Friendly name of the container. + string FriendlyName { get; set; } + /// Status of health of the container. + string HealthStatus { get; set; } + /// ProtectableContainerResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainer Property { get; set; } + /// + /// Type of the container. The value of this property for + /// 1. Compute Azure VM is Microsoft.Compute/virtualMachines + /// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType? ProtectableContainerType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResource.json.cs new file mode 100644 index 000000000000..9c4974ffec6a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Protectable Container Class. + public partial class ProtectableContainerResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectableContainerResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectableContainerResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectableContainer.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResourceList.cs new file mode 100644 index 000000000000..2d167bba7231 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectableContainer resources + public partial class ProtectableContainerResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ProtectableContainerResourceList() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + } + /// List of ProtectableContainer resources + public partial interface IProtectableContainerResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource[] Value { get; set; } + + } + /// List of ProtectableContainer resources + internal partial interface IProtectableContainerResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResourceList.json.cs new file mode 100644 index 000000000000..ea42f0f5e29d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectableContainerResourceList.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectableContainer resources + public partial class ProtectableContainerResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectableContainerResourceList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectableContainerResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectableContainerResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectableContainerResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItem.cs new file mode 100644 index 000000000000..2268988ec011 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItem.cs @@ -0,0 +1,372 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup items. + public partial class ProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; } + + /// Backing field for property. + private string _backupSetName; + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupSetName { get => this._backupSetName; set => this._backupSetName = value; } + + /// Backing field for property. + private string _containerName; + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? _createMode; + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => this._createMode; set => this._createMode = value; } + + /// Backing field for property. + private global::System.DateTime? _deferredDeleteTimeInUtc; + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => this._deferredDeleteTimeInUtc; set => this._deferredDeleteTimeInUtc = value; } + + /// Backing field for property. + private string _deferredDeleteTimeRemaining; + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DeferredDeleteTimeRemaining { get => this._deferredDeleteTimeRemaining; set => this._deferredDeleteTimeRemaining = value; } + + /// Backing field for property. + private bool? _isArchiveEnabled; + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsArchiveEnabled { get => this._isArchiveEnabled; set => this._isArchiveEnabled = value; } + + /// Backing field for property. + private bool? _isDeferredDeleteScheduleUpcoming; + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsDeferredDeleteScheduleUpcoming { get => this._isDeferredDeleteScheduleUpcoming; set => this._isDeferredDeleteScheduleUpcoming = value; } + + /// Backing field for property. + private bool? _isRehydrate; + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsRehydrate { get => this._isRehydrate; set => this._isRehydrate = value; } + + /// Backing field for property. + private bool? _isScheduledForDeferredDelete; + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsScheduledForDeferredDelete { get => this._isScheduledForDeferredDelete; set => this._isScheduledForDeferredDelete = value; } + + /// Backing field for property. + private global::System.DateTime? _lastRecoveryPoint; + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime? LastRecoveryPoint { get => this._lastRecoveryPoint; set => this._lastRecoveryPoint = value; } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.BackupManagementType { get => this._backupManagementType; set { {_backupManagementType = value;} } } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.VaultId { get => this._vaultId; set { {_vaultId = value;} } } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal.WorkloadType { get => this._workloadType; set { {_workloadType = value;} } } + + /// Backing field for property. + private string _policyId; + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyId { get => this._policyId; set => this._policyId = value; } + + /// Backing field for property. + private string _policyName; + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyName { get => this._policyName; set => this._policyName = value; } + + /// Backing field for property. + private string[] _resourceGuardOperationRequest; + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] ResourceGuardOperationRequest { get => this._resourceGuardOperationRequest; set => this._resourceGuardOperationRequest = value; } + + /// Backing field for property. + private int? _softDeleteRetentionPeriodInDay; + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? SoftDeleteRetentionPeriodInDay { get => this._softDeleteRetentionPeriodInDay; set => this._softDeleteRetentionPeriodInDay = value; } + + /// Backing field for property. + private string _sourceResourceId; + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Backing field for property. + private string _type; + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Backing field for property. + private string _vaultId; + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VaultId { get => this._vaultId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? _workloadType; + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => this._workloadType; } + + /// Creates an new instance. + public ProtectedItem() + { + + } + } + /// Base class for backup items. + public partial interface IProtectedItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Type of backup management for the backed up item.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; } + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the backup set the backup item belongs to", + SerializedName = @"backupSetName", + PossibleTypes = new [] { typeof(string) })] + string BackupSetName { get; set; } + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Unique name of container", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Create mode to indicate recovery of existing soft deleted data source or creation of new data source.", + SerializedName = @"createMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get; set; } + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time for deferred deletion in UTC", + SerializedName = @"deferredDeleteTimeInUTC", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DeferredDeleteTimeInUtc { get; set; } + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time remaining before the DS marked for deferred delete is permanently deleted", + SerializedName = @"deferredDeleteTimeRemaining", + PossibleTypes = new [] { typeof(string) })] + string DeferredDeleteTimeRemaining { get; set; } + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to identify whether datasource is protected in archive", + SerializedName = @"isArchiveEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsArchiveEnabled { get; set; } + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to identify whether the deferred deleted DS is to be purged soon", + SerializedName = @"isDeferredDeleteScheduleUpcoming", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDeferredDeleteScheduleUpcoming { get; set; } + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to identify that deferred deleted DS is to be moved into Pause state", + SerializedName = @"isRehydrate", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRehydrate { get; set; } + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to identify whether the DS is scheduled for deferred delete", + SerializedName = @"isScheduledForDeferredDelete", + PossibleTypes = new [] { typeof(bool) })] + bool? IsScheduledForDeferredDelete { get; set; } + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timestamp when the last (latest) backup copy was created for this backup item.", + SerializedName = @"lastRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastRecoveryPoint { get; set; } + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the backup policy with which this item is backed up.", + SerializedName = @"policyId", + PossibleTypes = new [] { typeof(string) })] + string PolicyId { get; set; } + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the policy used for protection", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuardOperationRequests on which LAC check will be performed", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Soft delete retention period in days", + SerializedName = @"softDeleteRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? SoftDeleteRetentionPeriodInDay { get; set; } + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM ID of the resource to be backed up.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"backup item type.", + SerializedName = @"protectedItemType", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"ID of the vault which protects this item", + SerializedName = @"vaultId", + PossibleTypes = new [] { typeof(string) })] + string VaultId { get; } + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Type of workload this item represents.", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get; } + + } + /// Base class for backup items. + internal partial interface IProtectedItemInternal + + { + /// Type of backup management for the backed up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Name of the backup set the backup item belongs to + string BackupSetName { get; set; } + /// Unique name of container + string ContainerName { get; set; } + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get; set; } + /// Time for deferred deletion in UTC + global::System.DateTime? DeferredDeleteTimeInUtc { get; set; } + /// Time remaining before the DS marked for deferred delete is permanently deleted + string DeferredDeleteTimeRemaining { get; set; } + /// Flag to identify whether datasource is protected in archive + bool? IsArchiveEnabled { get; set; } + /// Flag to identify whether the deferred deleted DS is to be purged soon + bool? IsDeferredDeleteScheduleUpcoming { get; set; } + /// Flag to identify that deferred deleted DS is to be moved into Pause state + bool? IsRehydrate { get; set; } + /// Flag to identify whether the DS is scheduled for deferred delete + bool? IsScheduledForDeferredDelete { get; set; } + /// Timestamp when the last (latest) backup copy was created for this backup item. + global::System.DateTime? LastRecoveryPoint { get; set; } + /// ID of the backup policy with which this item is backed up. + string PolicyId { get; set; } + /// Name of the policy used for protection + string PolicyName { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + string[] ResourceGuardOperationRequest { get; set; } + /// Soft delete retention period in days + int? SoftDeleteRetentionPeriodInDay { get; set; } + /// ARM ID of the resource to be backed up. + string SourceResourceId { get; set; } + /// backup item type. + string Type { get; set; } + /// ID of the vault which protects this item + string VaultId { get; set; } + /// Type of workload this item represents. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItem.json.cs new file mode 100644 index 000000000000..4ff7bba22525 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItem.json.cs @@ -0,0 +1,224 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup items. + public partial class ProtectedItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("protectedItemType") ) + { + case "AzureFileShareProtectedItem": + { + return new AzureFileshareProtectedItem(json); + } + case "AzureIaaSVMProtectedItem": + { + return new AzureIaaSvmProtectedItem(json); + } + case "Microsoft.ClassicCompute/virtualMachines": + { + return new AzureIaaSClassicComputeVmprotectedItem(json); + } + case "Microsoft.Compute/virtualMachines": + { + return new AzureIaaSComputeVmprotectedItem(json); + } + case "Microsoft.Sql/servers/databases": + { + return new AzureSqlProtectedItem(json); + } + case "AzureVmWorkloadProtectedItem": + { + return new AzureVMWorkloadProtectedItem(json); + } + case "AzureVmWorkloadSAPAseDatabase": + { + return new AzureVMWorkloadSapAseDatabaseProtectedItem(json); + } + case "AzureVmWorkloadSAPHanaDatabase": + { + return new AzureVMWorkloadSapHanaDatabaseProtectedItem(json); + } + case "AzureVmWorkloadSAPHanaDBInstance": + { + return new AzureVMWorkloadSapHanaDbinstanceProtectedItem(json); + } + case "AzureVmWorkloadSQLDatabase": + { + return new AzureVMWorkloadSqlDatabaseProtectedItem(json); + } + case "DPMProtectedItem": + { + return new DpmProtectedItem(json); + } + case "GenericProtectedItem": + { + return new GenericProtectedItem(json); + } + case "MabFileFolderProtectedItem": + { + return new MabFileFolderProtectedItem(json); + } + } + return new ProtectedItem(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectedItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("protectedItemType"), out var __jsonProtectedItemType) ? (string)__jsonProtectedItemType : (string)Type;} + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + {_policyId = If( json?.PropertyT("policyId"), out var __jsonPolicyId) ? (string)__jsonPolicyId : (string)PolicyId;} + {_lastRecoveryPoint = If( json?.PropertyT("lastRecoveryPoint"), out var __jsonLastRecoveryPoint) ? global::System.DateTime.TryParse((string)__jsonLastRecoveryPoint, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastRecoveryPointValue) ? __jsonLastRecoveryPointValue : LastRecoveryPoint : LastRecoveryPoint;} + {_backupSetName = If( json?.PropertyT("backupSetName"), out var __jsonBackupSetName) ? (string)__jsonBackupSetName : (string)BackupSetName;} + {_createMode = If( json?.PropertyT("createMode"), out var __jsonCreateMode) ? (string)__jsonCreateMode : (string)CreateMode;} + {_deferredDeleteTimeInUtc = If( json?.PropertyT("deferredDeleteTimeInUTC"), out var __jsonDeferredDeleteTimeInUtc) ? global::System.DateTime.TryParse((string)__jsonDeferredDeleteTimeInUtc, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDeferredDeleteTimeInUtcValue) ? __jsonDeferredDeleteTimeInUtcValue : DeferredDeleteTimeInUtc : DeferredDeleteTimeInUtc;} + {_isScheduledForDeferredDelete = If( json?.PropertyT("isScheduledForDeferredDelete"), out var __jsonIsScheduledForDeferredDelete) ? (bool?)__jsonIsScheduledForDeferredDelete : IsScheduledForDeferredDelete;} + {_deferredDeleteTimeRemaining = If( json?.PropertyT("deferredDeleteTimeRemaining"), out var __jsonDeferredDeleteTimeRemaining) ? (string)__jsonDeferredDeleteTimeRemaining : (string)DeferredDeleteTimeRemaining;} + {_isDeferredDeleteScheduleUpcoming = If( json?.PropertyT("isDeferredDeleteScheduleUpcoming"), out var __jsonIsDeferredDeleteScheduleUpcoming) ? (bool?)__jsonIsDeferredDeleteScheduleUpcoming : IsDeferredDeleteScheduleUpcoming;} + {_isRehydrate = If( json?.PropertyT("isRehydrate"), out var __jsonIsRehydrate) ? (bool?)__jsonIsRehydrate : IsRehydrate;} + {_resourceGuardOperationRequest = If( json?.PropertyT("resourceGuardOperationRequests"), out var __jsonResourceGuardOperationRequests) ? If( __jsonResourceGuardOperationRequests as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ResourceGuardOperationRequest;} + {_isArchiveEnabled = If( json?.PropertyT("isArchiveEnabled"), out var __jsonIsArchiveEnabled) ? (bool?)__jsonIsArchiveEnabled : IsArchiveEnabled;} + {_policyName = If( json?.PropertyT("policyName"), out var __jsonPolicyName) ? (string)__jsonPolicyName : (string)PolicyName;} + {_softDeleteRetentionPeriodInDay = If( json?.PropertyT("softDeleteRetentionPeriodInDays"), out var __jsonSoftDeleteRetentionPeriodInDays) ? (int?)__jsonSoftDeleteRetentionPeriodInDays : SoftDeleteRetentionPeriodInDay;} + {_vaultId = If( json?.PropertyT("vaultId"), out var __jsonVaultId) ? (string)__jsonVaultId : (string)VaultId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + 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, "protectedItemType" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + } + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AddIf( null != (((object)this._policyId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyId.ToString()) : null, "policyId" ,container.Add ); + AddIf( null != this._lastRecoveryPoint ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastRecoveryPoint?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastRecoveryPoint" ,container.Add ); + AddIf( null != (((object)this._backupSetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupSetName.ToString()) : null, "backupSetName" ,container.Add ); + AddIf( null != (((object)this._createMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._createMode.ToString()) : null, "createMode" ,container.Add ); + AddIf( null != this._deferredDeleteTimeInUtc ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._deferredDeleteTimeInUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "deferredDeleteTimeInUTC" ,container.Add ); + AddIf( null != this._isScheduledForDeferredDelete ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isScheduledForDeferredDelete) : null, "isScheduledForDeferredDelete" ,container.Add ); + AddIf( null != (((object)this._deferredDeleteTimeRemaining)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._deferredDeleteTimeRemaining.ToString()) : null, "deferredDeleteTimeRemaining" ,container.Add ); + AddIf( null != this._isDeferredDeleteScheduleUpcoming ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isDeferredDeleteScheduleUpcoming) : null, "isDeferredDeleteScheduleUpcoming" ,container.Add ); + AddIf( null != this._isRehydrate ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isRehydrate) : null, "isRehydrate" ,container.Add ); + if (null != this._resourceGuardOperationRequest) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourceGuardOperationRequest ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("resourceGuardOperationRequests",__w); + } + AddIf( null != this._isArchiveEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isArchiveEnabled) : null, "isArchiveEnabled" ,container.Add ); + AddIf( null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName" ,container.Add ); + AddIf( null != this._softDeleteRetentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._softDeleteRetentionPeriodInDay) : null, "softDeleteRetentionPeriodInDays" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._vaultId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._vaultId.ToString()) : null, "vaultId" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemQueryObject.cs new file mode 100644 index 000000000000..5018c446b226 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemQueryObject.cs @@ -0,0 +1,187 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list backup items. + public partial class ProtectedItemQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemQueryObjectInternal + { + + /// Backing field for property. + private string _backupEngineName; + + /// Backup Engine name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupEngineName { get => this._backupEngineName; set => this._backupEngineName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Backup management type for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private string _backupSetName; + + /// Name of the backup set. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupSetName { get => this._backupSetName; set => this._backupSetName = value; } + + /// Backing field for property. + private string _containerName; + + /// Name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// Backing field for property. + private string _fabricName; + + /// Name of the fabric. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FabricName { get => this._fabricName; set => this._fabricName = value; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of protected item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState? _healthState; + + /// Health State for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState? HealthState { get => this._healthState; set => this._healthState = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? _itemType; + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? ItemType { get => this._itemType; set => this._itemType = value; } + + /// Backing field for property. + private string _policyName; + + /// Backup policy name associated with the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyName { get => this._policyName; set => this._policyName = value; } + + /// Creates an new instance. + public ProtectedItemQueryObject() + { + + } + } + /// Filters to list backup items. + public partial interface IProtectedItemQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup Engine name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup Engine name", + SerializedName = @"backupEngineName", + PossibleTypes = new [] { typeof(string) })] + string BackupEngineName { get; set; } + /// Backup management type for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type for the backed up item.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Name of the backup set. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the backup set.", + SerializedName = @"backupSetName", + PossibleTypes = new [] { typeof(string) })] + string BackupSetName { get; set; } + /// Name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the container.", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// Name of the fabric. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the fabric.", + SerializedName = @"fabricName", + PossibleTypes = new [] { typeof(string) })] + string FabricName { get; set; } + /// Friendly name of protected item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of protected item", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Health State for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health State for the backed up item.", + SerializedName = @"healthState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState? HealthState { get; set; } + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of workload this item represents.", + SerializedName = @"itemType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? ItemType { get; set; } + /// Backup policy name associated with the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup policy name associated with the backup item.", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; set; } + + } + /// Filters to list backup items. + internal partial interface IProtectedItemQueryObjectInternal + + { + /// Backup Engine name + string BackupEngineName { get; set; } + /// Backup management type for the backed up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Name of the backup set. + string BackupSetName { get; set; } + /// Name of the container. + string ContainerName { get; set; } + /// Name of the fabric. + string FabricName { get; set; } + /// Friendly name of protected item + string FriendlyName { get; set; } + /// Health State for the backed up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState? HealthState { get; set; } + /// Type of workload this item represents. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? ItemType { get; set; } + /// Backup policy name associated with the backup item. + string PolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemQueryObject.json.cs new file mode 100644 index 000000000000..c0447525af17 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemQueryObject.json.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list backup items. + public partial class ProtectedItemQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectedItemQueryObject(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectedItemQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_healthState = If( json?.PropertyT("healthState"), out var __jsonHealthState) ? (string)__jsonHealthState : (string)HealthState;} + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_itemType = If( json?.PropertyT("itemType"), out var __jsonItemType) ? (string)__jsonItemType : (string)ItemType;} + {_policyName = If( json?.PropertyT("policyName"), out var __jsonPolicyName) ? (string)__jsonPolicyName : (string)PolicyName;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_backupEngineName = If( json?.PropertyT("backupEngineName"), out var __jsonBackupEngineName) ? (string)__jsonBackupEngineName : (string)BackupEngineName;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_fabricName = If( json?.PropertyT("fabricName"), out var __jsonFabricName) ? (string)__jsonFabricName : (string)FabricName;} + {_backupSetName = If( json?.PropertyT("backupSetName"), out var __jsonBackupSetName) ? (string)__jsonBackupSetName : (string)BackupSetName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._healthState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._healthState.ToString()) : null, "healthState" ,container.Add ); + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._itemType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._itemType.ToString()) : null, "itemType" ,container.Add ); + AddIf( null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName" ,container.Add ); + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != (((object)this._backupEngineName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupEngineName.ToString()) : null, "backupEngineName" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._fabricName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fabricName.ToString()) : null, "fabricName" ,container.Add ); + AddIf( null != (((object)this._backupSetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupSetName.ToString()) : null, "backupSetName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResource.cs new file mode 100644 index 000000000000..59d2a7328240 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResource.cs @@ -0,0 +1,381 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup items. + public partial class ProtectedItemResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).BackupManagementType; } + + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BackupSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).BackupSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).BackupSetName = value ?? null; } + + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).ContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).ContainerName = value ?? null; } + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).CreateMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).CreateMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode)""); } + + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? DeferredDeleteTimeInUtc { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).DeferredDeleteTimeInUtc; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).DeferredDeleteTimeInUtc = value ?? default(global::System.DateTime); } + + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string DeferredDeleteTimeRemaining { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).DeferredDeleteTimeRemaining; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).DeferredDeleteTimeRemaining = value ?? null; } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? IsArchiveEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).IsArchiveEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).IsArchiveEnabled = value ?? default(bool); } + + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? IsDeferredDeleteScheduleUpcoming { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).IsDeferredDeleteScheduleUpcoming; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).IsDeferredDeleteScheduleUpcoming = value ?? default(bool); } + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? IsRehydrate { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).IsRehydrate; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).IsRehydrate = value ?? default(bool); } + + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public bool? IsScheduledForDeferredDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).IsScheduledForDeferredDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).IsScheduledForDeferredDelete = value ?? default(bool); } + + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? LastRecoveryPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).LastRecoveryPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).LastRecoveryPoint = value ?? default(global::System.DateTime); } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for BackupManagementType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceInternal.BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).BackupManagementType = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem()); set { {_property = value;} } } + + /// Internal Acessors for VaultId + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceInternal.VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).VaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).VaultId = value; } + + /// Internal Acessors for WorkloadType + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceInternal.WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).WorkloadType = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).PolicyId = value ?? null; } + + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).PolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).PolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem _property; + + /// ProtectedItemResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem()); set => this._property = value; } + + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ProtectedItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).Type = value ?? null; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? SoftDeleteRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).SoftDeleteRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).SoftDeleteRetentionPeriodInDay = value ?? default(int); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).SourceResourceId = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string VaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).VaultId; } + + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemInternal)Property).WorkloadType; } + + /// Creates an new instance. + public ProtectedItemResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Base class for backup items. + public partial interface IProtectedItemResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Type of backup management for the backed up item.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; } + /// Name of the backup set the backup item belongs to + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the backup set the backup item belongs to", + SerializedName = @"backupSetName", + PossibleTypes = new [] { typeof(string) })] + string BackupSetName { get; set; } + /// Unique name of container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Unique name of container", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Create mode to indicate recovery of existing soft deleted data source or creation of new data source.", + SerializedName = @"createMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get; set; } + /// Time for deferred deletion in UTC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time for deferred deletion in UTC", + SerializedName = @"deferredDeleteTimeInUTC", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DeferredDeleteTimeInUtc { get; set; } + /// Time remaining before the DS marked for deferred delete is permanently deleted + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time remaining before the DS marked for deferred delete is permanently deleted", + SerializedName = @"deferredDeleteTimeRemaining", + PossibleTypes = new [] { typeof(string) })] + string DeferredDeleteTimeRemaining { get; set; } + /// Flag to identify whether datasource is protected in archive + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to identify whether datasource is protected in archive", + SerializedName = @"isArchiveEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsArchiveEnabled { get; set; } + /// Flag to identify whether the deferred deleted DS is to be purged soon + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to identify whether the deferred deleted DS is to be purged soon", + SerializedName = @"isDeferredDeleteScheduleUpcoming", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDeferredDeleteScheduleUpcoming { get; set; } + /// Flag to identify that deferred deleted DS is to be moved into Pause state + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to identify that deferred deleted DS is to be moved into Pause state", + SerializedName = @"isRehydrate", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRehydrate { get; set; } + /// Flag to identify whether the DS is scheduled for deferred delete + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Flag to identify whether the DS is scheduled for deferred delete", + SerializedName = @"isScheduledForDeferredDelete", + PossibleTypes = new [] { typeof(bool) })] + bool? IsScheduledForDeferredDelete { get; set; } + /// Timestamp when the last (latest) backup copy was created for this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timestamp when the last (latest) backup copy was created for this backup item.", + SerializedName = @"lastRecoveryPoint", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastRecoveryPoint { get; set; } + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the backup policy with which this item is backed up.", + SerializedName = @"policyId", + PossibleTypes = new [] { typeof(string) })] + string PolicyId { get; set; } + /// Name of the policy used for protection + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the policy used for protection", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; set; } + /// backup item type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"backup item type.", + SerializedName = @"protectedItemType", + PossibleTypes = new [] { typeof(string) })] + string ProtectedItemType { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuardOperationRequests on which LAC check will be performed", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + /// Soft delete retention period in days + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Soft delete retention period in days", + SerializedName = @"softDeleteRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? SoftDeleteRetentionPeriodInDay { get; set; } + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM ID of the resource to be backed up.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + /// ID of the vault which protects this item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"ID of the vault which protects this item", + SerializedName = @"vaultId", + PossibleTypes = new [] { typeof(string) })] + string VaultId { get; } + /// Type of workload this item represents. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Type of workload this item represents.", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get; } + + } + /// Base class for backup items. + internal partial interface IProtectedItemResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Type of backup management for the backed up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Name of the backup set the backup item belongs to + string BackupSetName { get; set; } + /// Unique name of container + string ContainerName { get; set; } + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode? CreateMode { get; set; } + /// Time for deferred deletion in UTC + global::System.DateTime? DeferredDeleteTimeInUtc { get; set; } + /// Time remaining before the DS marked for deferred delete is permanently deleted + string DeferredDeleteTimeRemaining { get; set; } + /// Flag to identify whether datasource is protected in archive + bool? IsArchiveEnabled { get; set; } + /// Flag to identify whether the deferred deleted DS is to be purged soon + bool? IsDeferredDeleteScheduleUpcoming { get; set; } + /// Flag to identify that deferred deleted DS is to be moved into Pause state + bool? IsRehydrate { get; set; } + /// Flag to identify whether the DS is scheduled for deferred delete + bool? IsScheduledForDeferredDelete { get; set; } + /// Timestamp when the last (latest) backup copy was created for this backup item. + global::System.DateTime? LastRecoveryPoint { get; set; } + /// ID of the backup policy with which this item is backed up. + string PolicyId { get; set; } + /// Name of the policy used for protection + string PolicyName { get; set; } + /// ProtectedItemResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItem Property { get; set; } + /// backup item type. + string ProtectedItemType { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + string[] ResourceGuardOperationRequest { get; set; } + /// Soft delete retention period in days + int? SoftDeleteRetentionPeriodInDay { get; set; } + /// ARM ID of the resource to be backed up. + string SourceResourceId { get; set; } + /// ID of the vault which protects this item + string VaultId { get; set; } + /// Type of workload this item represents. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType? WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResource.json.cs new file mode 100644 index 000000000000..c5cd5b5d0706 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup items. + public partial class ProtectedItemResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectedItemResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectedItemResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItem.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResourceList.cs new file mode 100644 index 000000000000..aedbcba4c9e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectedItem resources + public partial class ProtectedItemResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ProtectedItemResourceList() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + } + /// List of ProtectedItem resources + public partial interface IProtectedItemResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource[] Value { get; set; } + + } + /// List of ProtectedItem resources + internal partial interface IProtectedItemResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResourceList.json.cs new file mode 100644 index 000000000000..8140017639c5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectedItemResourceList.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectedItem resources + public partial class ProtectedItemResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectedItemResourceList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectedItemResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItemResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainer.cs new file mode 100644 index 000000000000..d329f890e1e6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainer.cs @@ -0,0 +1,156 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for container with backup items. Containers with specific workloads are derived from this class. + /// + public partial class ProtectionContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType _containerType; + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get => this._containerType; set => this._containerType = value; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Backing field for property. + private string _healthStatus; + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string HealthStatus { get => this._healthStatus; set => this._healthStatus = value; } + + /// Backing field for property. + private string _protectableObjectType; + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectableObjectType { get => this._protectableObjectType; set => this._protectableObjectType = value; } + + /// Backing field for property. + private string _registrationStatus; + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RegistrationStatus { get => this._registrationStatus; set => this._registrationStatus = value; } + + /// Creates an new instance. + public ProtectionContainer() + { + + } + } + /// Base class for container with backup items. Containers with specific workloads are derived from this class. + public partial interface IProtectionContainer : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management for the container.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + Backup is VMAppContainer", + SerializedName = @"containerType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get; set; } + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the container.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of health of the container.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(string) })] + string HealthStatus { get; set; } + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the protectable object associated with this container", + SerializedName = @"protectableObjectType", + PossibleTypes = new [] { typeof(string) })] + string ProtectableObjectType { get; set; } + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of registration of the container with the Recovery Services Vault.", + SerializedName = @"registrationStatus", + PossibleTypes = new [] { typeof(string) })] + string RegistrationStatus { get; set; } + + } + /// Base class for container with backup items. Containers with specific workloads are derived from this class. + internal partial interface IProtectionContainerInternal + + { + /// Type of backup management for the container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType ContainerType { get; set; } + /// Friendly name of the container. + string FriendlyName { get; set; } + /// Status of health of the container. + string HealthStatus { get; set; } + /// Type of the protectable object associated with this container + string ProtectableObjectType { get; set; } + /// Status of registration of the container with the Recovery Services Vault. + string RegistrationStatus { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainer.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainer.json.cs new file mode 100644 index 000000000000..39685625b6f7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainer.json.cs @@ -0,0 +1,179 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for container with backup items. Containers with specific workloads are derived from this class. + /// + public partial class ProtectionContainer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("containerType") ) + { + case "DPMContainer": + { + return new DpmContainer(json); + } + case "AzureBackupServerContainer": + { + return new AzureBackupServerContainer(json); + } + case "IaasVMContainer": + { + return new IaaSvmContainer(json); + } + case "Microsoft.ClassicCompute/virtualMachines": + { + return new AzureIaaSClassicComputeVmcontainer(json); + } + case "Microsoft.Compute/virtualMachines": + { + return new AzureIaaSComputeVmcontainer(json); + } + case "AzureWorkloadContainer": + { + return new AzureWorkloadContainer(json); + } + case "SQLAGWorkLoadContainer": + { + return new AzureSqlagWorkloadContainerProtectionContainer(json); + } + case "AzureSqlContainer": + { + return new AzureSqlContainer(json); + } + case "StorageContainer": + { + return new AzureStorageContainer(json); + } + case "VMAppContainer": + { + return new AzureVMAppContainerProtectionContainer(json); + } + case "GenericContainer": + { + return new GenericContainer(json); + } + case "Windows": + { + return new MabContainer(json); + } + } + return new ProtectionContainer(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionContainer(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_registrationStatus = If( json?.PropertyT("registrationStatus"), out var __jsonRegistrationStatus) ? (string)__jsonRegistrationStatus : (string)RegistrationStatus;} + {_healthStatus = If( json?.PropertyT("healthStatus"), out var __jsonHealthStatus) ? (string)__jsonHealthStatus : (string)HealthStatus;} + {_containerType = If( json?.PropertyT("containerType"), out var __jsonContainerType) ? (string)__jsonContainerType : (string)ContainerType;} + {_protectableObjectType = If( json?.PropertyT("protectableObjectType"), out var __jsonProtectableObjectType) ? (string)__jsonProtectableObjectType : (string)ProtectableObjectType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._registrationStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._registrationStatus.ToString()) : null, "registrationStatus" ,container.Add ); + AddIf( null != (((object)this._healthStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._healthStatus.ToString()) : null, "healthStatus" ,container.Add ); + AddIf( null != (((object)this._containerType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerType.ToString()) : null, "containerType" ,container.Add ); + AddIf( null != (((object)this._protectableObjectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectableObjectType.ToString()) : null, "protectableObjectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResource.cs new file mode 100644 index 000000000000..c7a03b642307 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResource.cs @@ -0,0 +1,204 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for container with backup items. Containers with specific workloads are derived from this class. + /// + public partial class ProtectionContainerResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType? ContainerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).ContainerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).ContainerType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType)""); } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).FriendlyName = value ?? null; } + + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).HealthStatus = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer _property; + + /// ProtectionContainerResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer()); set => this._property = value; } + + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ProtectableObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).ProtectableObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).ProtectableObjectType = value ?? null; } + + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RegistrationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).RegistrationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerInternal)Property).RegistrationStatus = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProtectionContainerResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Base class for container with backup items. Containers with specific workloads are derived from this class. + public partial interface IProtectionContainerResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Type of backup management for the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management for the container.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + Backup is VMAppContainer", + SerializedName = @"containerType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType? ContainerType { get; set; } + /// Friendly name of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the container.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Status of health of the container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of health of the container.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(string) })] + string HealthStatus { get; set; } + /// Type of the protectable object associated with this container + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the protectable object associated with this container", + SerializedName = @"protectableObjectType", + PossibleTypes = new [] { typeof(string) })] + string ProtectableObjectType { get; set; } + /// Status of registration of the container with the Recovery Services Vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of registration of the container with the Recovery Services Vault.", + SerializedName = @"registrationStatus", + PossibleTypes = new [] { typeof(string) })] + string RegistrationStatus { get; set; } + + } + /// Base class for container with backup items. Containers with specific workloads are derived from this class. + internal partial interface IProtectionContainerResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Type of backup management for the container. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// + /// Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. + /// Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is + /// Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload + /// Backup is VMAppContainer + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType? ContainerType { get; set; } + /// Friendly name of the container. + string FriendlyName { get; set; } + /// Status of health of the container. + string HealthStatus { get; set; } + /// ProtectionContainerResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainer Property { get; set; } + /// Type of the protectable object associated with this container + string ProtectableObjectType { get; set; } + /// Status of registration of the container with the Recovery Services Vault. + string RegistrationStatus { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResource.json.cs new file mode 100644 index 000000000000..a934c8534a57 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResource.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for container with backup items. Containers with specific workloads are derived from this class. + /// + public partial class ProtectionContainerResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectionContainerResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionContainerResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainer.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResourceList.cs new file mode 100644 index 000000000000..7ee070127366 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectionContainer resources + public partial class ProtectionContainerResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ProtectionContainerResourceList() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + } + /// List of ProtectionContainer resources + public partial interface IProtectionContainerResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource[] Value { get; set; } + + } + /// List of ProtectionContainer resources + internal partial interface IProtectionContainerResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResourceList.json.cs new file mode 100644 index 000000000000..07477ea3a4ee --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionContainerResourceList.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectionContainer resources + public partial class ProtectionContainerResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectionContainerResourceList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionContainerResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainerResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntent.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntent.cs new file mode 100644 index 000000000000..a49a4041759e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntent.cs @@ -0,0 +1,142 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup ProtectionIntent. + public partial class ProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private string _itemId; + + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ItemId { get => this._itemId; set => this._itemId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType _itemType; + + /// backup protectionIntent type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType ItemType { get => this._itemType; set => this._itemType = value; } + + /// Backing field for property. + private string _policyId; + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyId { get => this._policyId; set => this._policyId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? _protectionState; + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// Backing field for property. + private string _sourceResourceId; + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Creates an new instance. + public ProtectionIntent() + { + + } + } + /// Base class for backup ProtectionIntent. + public partial interface IProtectionIntent : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management for the backed up item.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId", + SerializedName = @"itemId", + PossibleTypes = new [] { typeof(string) })] + string ItemId { get; set; } + /// backup protectionIntent type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"backup protectionIntent type.", + SerializedName = @"protectionIntentItemType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType ItemType { get; set; } + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the backup policy with which this item is backed up.", + SerializedName = @"policyId", + PossibleTypes = new [] { typeof(string) })] + string PolicyId { get; set; } + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup state of this backup item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM ID of the resource to be backed up.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + + } + /// Base class for backup ProtectionIntent. + internal partial interface IProtectionIntentInternal + + { + /// Type of backup management for the backed up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + string ItemId { get; set; } + /// backup protectionIntent type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType ItemType { get; set; } + /// ID of the backup policy with which this item is backed up. + string PolicyId { get; set; } + /// Backup state of this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// ARM ID of the resource to be backed up. + string SourceResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntent.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntent.json.cs new file mode 100644 index 000000000000..379ffbf717cc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntent.json.cs @@ -0,0 +1,149 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup ProtectionIntent. + public partial class ProtectionIntent + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent interface is + /// polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("protectionIntentItemType") ) + { + case "RecoveryServiceVaultItem": + { + return new AzureRecoveryServiceVaultProtectionIntent(json); + } + case "AzureResourceItem": + { + return new AzureResourceProtectionIntent(json); + } + case "AzureWorkloadContainerAutoProtectionIntent": + { + return new AzureWorkloadContainerAutoProtectionIntent(json); + } + case "AzureWorkloadAutoProtectionIntent": + { + return new AzureWorkloadAutoProtectionIntent(json); + } + case "AzureWorkloadSQLAutoProtectionIntent": + { + return new AzureWorkloadSqlAutoProtectionIntent(json); + } + } + return new ProtectionIntent(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionIntent(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_itemType = If( json?.PropertyT("protectionIntentItemType"), out var __jsonProtectionIntentItemType) ? (string)__jsonProtectionIntentItemType : (string)ItemType;} + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + {_itemId = If( json?.PropertyT("itemId"), out var __jsonItemId) ? (string)__jsonItemId : (string)ItemId;} + {_policyId = If( json?.PropertyT("policyId"), out var __jsonPolicyId) ? (string)__jsonPolicyId : (string)PolicyId;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._itemType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._itemType.ToString()) : null, "protectionIntentItemType" ,container.Add ); + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AddIf( null != (((object)this._itemId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._itemId.ToString()) : null, "itemId" ,container.Add ); + AddIf( null != (((object)this._policyId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyId.ToString()) : null, "policyId" ,container.Add ); + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentQueryObject.cs new file mode 100644 index 000000000000..f8ab1631f48e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentQueryObject.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list protection intent. + public partial class ProtectionIntentQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentQueryObjectInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Backup management type for the backed up item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private string _itemName; + + /// Item name of the intent + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ItemName { get => this._itemName; set => this._itemName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType? _itemType; + + /// Type of workload this item represents + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType? ItemType { get => this._itemType; set => this._itemType = value; } + + /// Backing field for property. + private string _parentName; + + /// Parent name of the intent + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ParentName { get => this._parentName; set => this._parentName = value; } + + /// Creates an new instance. + public ProtectionIntentQueryObject() + { + + } + } + /// Filters to list protection intent. + public partial interface IProtectionIntentQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup management type for the backed up item + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type for the backed up item", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Item name of the intent + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Item name of the intent", + SerializedName = @"itemName", + PossibleTypes = new [] { typeof(string) })] + string ItemName { get; set; } + /// Type of workload this item represents + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of workload this item represents", + SerializedName = @"itemType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType? ItemType { get; set; } + /// Parent name of the intent + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parent name of the intent", + SerializedName = @"parentName", + PossibleTypes = new [] { typeof(string) })] + string ParentName { get; set; } + + } + /// Filters to list protection intent. + internal partial interface IProtectionIntentQueryObjectInternal + + { + /// Backup management type for the backed up item + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Item name of the intent + string ItemName { get; set; } + /// Type of workload this item represents + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType? ItemType { get; set; } + /// Parent name of the intent + string ParentName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentQueryObject.json.cs new file mode 100644 index 000000000000..fce6da5abe1e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentQueryObject.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters to list protection intent. + public partial class ProtectionIntentQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectionIntentQueryObject(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionIntentQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_itemType = If( json?.PropertyT("itemType"), out var __jsonItemType) ? (string)__jsonItemType : (string)ItemType;} + {_parentName = If( json?.PropertyT("parentName"), out var __jsonParentName) ? (string)__jsonParentName : (string)ParentName;} + {_itemName = If( json?.PropertyT("itemName"), out var __jsonItemName) ? (string)__jsonItemName : (string)ItemName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._itemType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._itemType.ToString()) : null, "itemType" ,container.Add ); + AddIf( null != (((object)this._parentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._parentName.ToString()) : null, "parentName" ,container.Add ); + AddIf( null != (((object)this._itemName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._itemName.ToString()) : null, "itemName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResource.cs new file mode 100644 index 000000000000..81fa2d9dda3c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResource.cs @@ -0,0 +1,190 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup ProtectionIntent. + public partial class ProtectionIntentResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ItemId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).ItemId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).ItemId = value ?? null; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string PolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).PolicyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).PolicyId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent _property; + + /// ProtectionIntentResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent()); set => this._property = value; } + + /// backup protectionIntent type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType? ProtectionIntentItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).ItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).ItemType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType)""); } + + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentInternal)Property).SourceResourceId = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProtectionIntentResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Base class for backup ProtectionIntent. + public partial interface IProtectionIntentResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Type of backup management for the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management for the backed up item.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId", + SerializedName = @"itemId", + PossibleTypes = new [] { typeof(string) })] + string ItemId { get; set; } + /// ID of the backup policy with which this item is backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ID of the backup policy with which this item is backed up.", + SerializedName = @"policyId", + PossibleTypes = new [] { typeof(string) })] + string PolicyId { get; set; } + /// backup protectionIntent type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"backup protectionIntent type.", + SerializedName = @"protectionIntentItemType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType? ProtectionIntentItemType { get; set; } + /// Backup state of this backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup state of this backup item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// ARM ID of the resource to be backed up. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ARM ID of the resource to be backed up.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + + } + /// Base class for backup ProtectionIntent. + internal partial interface IProtectionIntentResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Type of backup management for the backed up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// + /// ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + /// + string ItemId { get; set; } + /// ID of the backup policy with which this item is backed up. + string PolicyId { get; set; } + /// ProtectionIntentResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntent Property { get; set; } + /// backup protectionIntent type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType? ProtectionIntentItemType { get; set; } + /// Backup state of this backup item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// ARM ID of the resource to be backed up. + string SourceResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResource.json.cs new file mode 100644 index 000000000000..c455a5056268 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup ProtectionIntent. + public partial class ProtectionIntentResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectionIntentResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionIntentResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntent.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResourceList.cs new file mode 100644 index 000000000000..9714c3e53279 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectionIntent resources + public partial class ProtectionIntentResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ProtectionIntentResourceList() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + } + /// List of ProtectionIntent resources + public partial interface IProtectionIntentResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource[] Value { get; set; } + + } + /// List of ProtectionIntent resources + internal partial interface IProtectionIntentResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResourceList.json.cs new file mode 100644 index 000000000000..40eb42af13db --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionIntentResourceList.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectionIntent resources + public partial class ProtectionIntentResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectionIntentResourceList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionIntentResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntentResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicy.cs new file mode 100644 index 000000000000..81dadd5a539f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicy.cs @@ -0,0 +1,93 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup policy. Workload-specific backup policies are derived from this class. + /// + public partial class ProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal + { + + /// Backing field for property. + private string _backupManagementType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private int? _protectedItemsCount; + + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ProtectedItemsCount { get => this._protectedItemsCount; set => this._protectedItemsCount = value; } + + /// Backing field for property. + private string[] _resourceGuardOperationRequest; + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] ResourceGuardOperationRequest { get => this._resourceGuardOperationRequest; set => this._resourceGuardOperationRequest = value; } + + /// Creates an new instance. + public ProtectionPolicy() + { + + } + } + /// Base class for backup policy. Workload-specific backup policies are derived from this class. + public partial interface IProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(string) })] + string BackupManagementType { get; set; } + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of items associated with this policy.", + SerializedName = @"protectedItemsCount", + PossibleTypes = new [] { typeof(int) })] + int? ProtectedItemsCount { get; set; } + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuard Operation Requests", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + + } + /// Base class for backup policy. Workload-specific backup policies are derived from this class. + internal partial interface IProtectionPolicyInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string BackupManagementType { get; set; } + /// Number of items associated with this policy. + int? ProtectedItemsCount { get; set; } + /// ResourceGuard Operation Requests + string[] ResourceGuardOperationRequest { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicy.json.cs new file mode 100644 index 000000000000..867ea9fa6a8e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicy.json.cs @@ -0,0 +1,157 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup policy. Workload-specific backup policies are derived from this class. + /// + public partial class ProtectionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy interface is + /// polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("backupManagementType") ) + { + case "AzureWorkload": + { + return new AzureVMWorkloadProtectionPolicy(json); + } + case "AzureStorage": + { + return new AzureFileShareProtectionPolicy(json); + } + case "AzureIaasVM": + { + return new AzureIaaSvmProtectionPolicy(json); + } + case "AzureSql": + { + return new AzureSqlProtectionPolicy(json); + } + case "GenericProtectionPolicy": + { + return new GenericProtectionPolicy(json); + } + case "MAB": + { + return new MabProtectionPolicy(json); + } + } + return new ProtectionPolicy(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_protectedItemsCount = If( json?.PropertyT("protectedItemsCount"), out var __jsonProtectedItemsCount) ? (int?)__jsonProtectedItemsCount : ProtectedItemsCount;} + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_resourceGuardOperationRequest = If( json?.PropertyT("resourceGuardOperationRequests"), out var __jsonResourceGuardOperationRequests) ? If( __jsonResourceGuardOperationRequests as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ResourceGuardOperationRequest;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._protectedItemsCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._protectedItemsCount) : null, "protectedItemsCount" ,container.Add ); + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + if (null != this._resourceGuardOperationRequest) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourceGuardOperationRequest ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("resourceGuardOperationRequests",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyQueryObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyQueryObject.cs new file mode 100644 index 000000000000..04be10df981c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyQueryObject.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters the list backup policies API. + public partial class ProtectionPolicyQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyQueryObject, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyQueryObjectInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? _backupManagementType; + + /// Backup management type for the backup policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private string _fabricName; + + /// Fabric name for filter + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FabricName { get => this._fabricName; set => this._fabricName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? _workloadType; + + /// Workload type for the backup policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public ProtectionPolicyQueryObject() + { + + } + } + /// Filters the list backup policies API. + public partial interface IProtectionPolicyQueryObject : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Backup management type for the backup policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup management type for the backup policy.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Fabric name for filter + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fabric name for filter", + SerializedName = @"fabricName", + PossibleTypes = new [] { typeof(string) })] + string FabricName { get; set; } + /// Workload type for the backup policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload type for the backup policy.", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } + /// Filters the list backup policies API. + internal partial interface IProtectionPolicyQueryObjectInternal + + { + /// Backup management type for the backup policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get; set; } + /// Fabric name for filter + string FabricName { get; set; } + /// Workload type for the backup policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType? WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyQueryObject.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyQueryObject.json.cs new file mode 100644 index 000000000000..011d9fd2a5e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyQueryObject.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Filters the list backup policies API. + public partial class ProtectionPolicyQueryObject + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyQueryObject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyQueryObject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyQueryObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectionPolicyQueryObject(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionPolicyQueryObject(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_fabricName = If( json?.PropertyT("fabricName"), out var __jsonFabricName) ? (string)__jsonFabricName : (string)FabricName;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._fabricName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fabricName.ToString()) : null, "fabricName" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResource.cs new file mode 100644 index 000000000000..e79bacc9b583 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResource.cs @@ -0,0 +1,150 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup policy. Workload-specific backup policies are derived from this class. + /// + public partial class ProtectionPolicyResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)Property).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)Property).BackupManagementType = value ?? null; } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy _property; + + /// ProtectionPolicyResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy()); set => this._property = value; } + + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? ProtectedItemsCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)Property).ProtectedItemsCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)Property).ProtectedItemsCount = value ?? default(int); } + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)Property).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyInternal)Property).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProtectionPolicyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Base class for backup policy. Workload-specific backup policies are derived from this class. + public partial interface IProtectionPolicyResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(string) })] + string BackupManagementType { get; set; } + /// Number of items associated with this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of items associated with this policy.", + SerializedName = @"protectedItemsCount", + PossibleTypes = new [] { typeof(int) })] + int? ProtectedItemsCount { get; set; } + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuard Operation Requests", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + + } + /// Base class for backup policy. Workload-specific backup policies are derived from this class. + internal partial interface IProtectionPolicyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string BackupManagementType { get; set; } + /// ProtectionPolicyResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicy Property { get; set; } + /// Number of items associated with this policy. + int? ProtectedItemsCount { get; set; } + /// ResourceGuard Operation Requests + string[] ResourceGuardOperationRequest { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResource.json.cs new file mode 100644 index 000000000000..fbcf7f92dc6a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResource.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup policy. Workload-specific backup policies are derived from this class. + /// + public partial class ProtectionPolicyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectionPolicyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionPolicyResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicy.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResourceList.cs new file mode 100644 index 000000000000..0652c96ef5a1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectionPolicy resources + public partial class ProtectionPolicyResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ProtectionPolicyResourceList() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + } + /// List of ProtectionPolicy resources + public partial interface IProtectionPolicyResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource[] Value { get; set; } + + } + /// List of ProtectionPolicy resources + internal partial interface IProtectionPolicyResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResourceList.json.cs new file mode 100644 index 000000000000..d5d749f6a3a2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ProtectionPolicyResourceList.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ProtectionPolicy resources + public partial class ProtectionPolicyResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ProtectionPolicyResourceList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ProtectionPolicyResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicyResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPoint.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPoint.cs new file mode 100644 index 000000000000..de48bcfcea0b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPoint.cs @@ -0,0 +1,59 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup copies. Workload-specific backup copies are derived from this class. + /// + public partial class RecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Creates an new instance. + public RecoveryPoint() + { + + } + } + /// Base class for backup copies. Workload-specific backup copies are derived from this class. + public partial interface IRecoveryPoint : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Base class for backup copies. Workload-specific backup copies are derived from this class. + internal partial interface IRecoveryPointInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPoint.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPoint.json.cs new file mode 100644 index 000000000000..1bc1b811b306 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPoint.json.cs @@ -0,0 +1,157 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup copies. Workload-specific backup copies are derived from this class. + /// + public partial class RecoveryPoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureFileShareRecoveryPoint": + { + return new AzureFileShareRecoveryPoint(json); + } + case "AzureWorkloadRecoveryPoint": + { + return new AzureWorkloadRecoveryPoint(json); + } + case "AzureWorkloadPointInTimeRecoveryPoint": + { + return new AzureWorkloadPointInTimeRecoveryPoint(json); + } + case "AzureWorkloadSAPHanaPointInTimeRecoveryPoint": + { + return new AzureWorkloadSapHanaPointInTimeRecoveryPoint(json); + } + case "AzureWorkloadSAPHanaRecoveryPoint": + { + return new AzureWorkloadSapHanaRecoveryPoint(json); + } + case "AzureWorkloadSQLRecoveryPoint": + { + return new AzureWorkloadSqlRecoveryPoint(json); + } + case "AzureWorkloadSQLPointInTimeRecoveryPoint": + { + return new AzureWorkloadSqlPointInTimeRecoveryPoint(json); + } + case "GenericRecoveryPoint": + { + return new GenericRecoveryPoint(json); + } + case "IaasVMRecoveryPoint": + { + return new IaasVMRecoveryPoint(json); + } + } + return new RecoveryPoint(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryPoint(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointDiskConfiguration.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointDiskConfiguration.cs new file mode 100644 index 000000000000..e89efae72caf --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointDiskConfiguration.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Disk configuration + public partial class RecoveryPointDiskConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfigurationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] _excludedDiskList; + + /// Information of disks excluded from backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] ExcludedDiskList { get => this._excludedDiskList; set => this._excludedDiskList = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] _includedDiskList; + + /// Information of disks included in backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] IncludedDiskList { get => this._includedDiskList; set => this._includedDiskList = value; } + + /// Backing field for property. + private int? _numberOfDisksAttachedToVM; + + /// Number of disks attached to the VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? NumberOfDisksAttachedToVM { get => this._numberOfDisksAttachedToVM; set => this._numberOfDisksAttachedToVM = value; } + + /// Backing field for property. + private int? _numberOfDisksIncludedInBackup; + + /// Number of disks included in backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? NumberOfDisksIncludedInBackup { get => this._numberOfDisksIncludedInBackup; set => this._numberOfDisksIncludedInBackup = value; } + + /// Creates an new instance. + public RecoveryPointDiskConfiguration() + { + + } + } + /// Disk configuration + public partial interface IRecoveryPointDiskConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Information of disks excluded from backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Information of disks excluded from backup", + SerializedName = @"excludedDiskList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] ExcludedDiskList { get; set; } + /// Information of disks included in backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Information of disks included in backup", + SerializedName = @"includedDiskList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] IncludedDiskList { get; set; } + /// Number of disks attached to the VM + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of disks attached to the VM", + SerializedName = @"numberOfDisksAttachedToVm", + PossibleTypes = new [] { typeof(int) })] + int? NumberOfDisksAttachedToVM { get; set; } + /// Number of disks included in backup + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of disks included in backup", + SerializedName = @"numberOfDisksIncludedInBackup", + PossibleTypes = new [] { typeof(int) })] + int? NumberOfDisksIncludedInBackup { get; set; } + + } + /// Disk configuration + internal partial interface IRecoveryPointDiskConfigurationInternal + + { + /// Information of disks excluded from backup + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] ExcludedDiskList { get; set; } + /// Information of disks included in backup + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation[] IncludedDiskList { get; set; } + /// Number of disks attached to the VM + int? NumberOfDisksAttachedToVM { get; set; } + /// Number of disks included in backup + int? NumberOfDisksIncludedInBackup { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointDiskConfiguration.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointDiskConfiguration.json.cs new file mode 100644 index 000000000000..b59f61cbc81f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointDiskConfiguration.json.cs @@ -0,0 +1,130 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Disk configuration + public partial class RecoveryPointDiskConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointDiskConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryPointDiskConfiguration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryPointDiskConfiguration(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_numberOfDisksIncludedInBackup = If( json?.PropertyT("numberOfDisksIncludedInBackup"), out var __jsonNumberOfDisksIncludedInBackup) ? (int?)__jsonNumberOfDisksIncludedInBackup : NumberOfDisksIncludedInBackup;} + {_numberOfDisksAttachedToVM = If( json?.PropertyT("numberOfDisksAttachedToVm"), out var __jsonNumberOfDisksAttachedToVM) ? (int?)__jsonNumberOfDisksAttachedToVM : NumberOfDisksAttachedToVM;} + {_includedDiskList = If( json?.PropertyT("includedDiskList"), out var __jsonIncludedDiskList) ? If( __jsonIncludedDiskList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DiskInformation.FromJson(__u) )) ))() : null : IncludedDiskList;} + {_excludedDiskList = If( json?.PropertyT("excludedDiskList"), out var __jsonExcludedDiskList) ? If( __jsonExcludedDiskList as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDiskInformation) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DiskInformation.FromJson(__p) )) ))() : null : ExcludedDiskList;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._numberOfDisksIncludedInBackup ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._numberOfDisksIncludedInBackup) : null, "numberOfDisksIncludedInBackup" ,container.Add ); + AddIf( null != this._numberOfDisksAttachedToVM ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._numberOfDisksAttachedToVM) : null, "numberOfDisksAttachedToVm" ,container.Add ); + if (null != this._includedDiskList) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._includedDiskList ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("includedDiskList",__w); + } + if (null != this._excludedDiskList) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._excludedDiskList ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("excludedDiskList",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointMoveReadinessInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointMoveReadinessInfo.cs new file mode 100644 index 000000000000..9d56f7151cd6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointMoveReadinessInfo.cs @@ -0,0 +1,61 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class RecoveryPointMoveReadinessInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfoInternal + { + + /// Backing field for property. + private string _additionalInfo; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AdditionalInfo { get => this._additionalInfo; set => this._additionalInfo = value; } + + /// Backing field for property. + private bool? _isReadyForMove; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsReadyForMove { get => this._isReadyForMove; set => this._isReadyForMove = value; } + + /// Creates an new instance. + public RecoveryPointMoveReadinessInfo() + { + + } + } + public partial interface IRecoveryPointMoveReadinessInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(string) })] + string AdditionalInfo { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"isReadyForMove", + PossibleTypes = new [] { typeof(bool) })] + bool? IsReadyForMove { get; set; } + + } + internal partial interface IRecoveryPointMoveReadinessInfoInternal + + { + string AdditionalInfo { get; set; } + + bool? IsReadyForMove { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointMoveReadinessInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointMoveReadinessInfo.json.cs new file mode 100644 index 000000000000..bf9636ce4c94 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointMoveReadinessInfo.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class RecoveryPointMoveReadinessInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointMoveReadinessInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryPointMoveReadinessInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryPointMoveReadinessInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_isReadyForMove = If( json?.PropertyT("isReadyForMove"), out var __jsonIsReadyForMove) ? (bool?)__jsonIsReadyForMove : IsReadyForMove;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? (string)__jsonAdditionalInfo : (string)AdditionalInfo;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._isReadyForMove ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isReadyForMove) : null, "isReadyForMove" ,container.Add ); + AddIf( null != (((object)this._additionalInfo)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._additionalInfo.ToString()) : null, "additionalInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointProperties.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointProperties.cs new file mode 100644 index 000000000000..46d1e0ab9343 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointProperties.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Properties of Recovery Point + public partial class RecoveryPointProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointPropertiesInternal + { + + /// Backing field for property. + private string _expiryTime; + + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ExpiryTime { get => this._expiryTime; set => this._expiryTime = value; } + + /// Backing field for property. + private bool? _isSoftDeleted; + + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsSoftDeleted { get => this._isSoftDeleted; set => this._isSoftDeleted = value; } + + /// Backing field for property. + private string _ruleName; + + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RuleName { get => this._ruleName; set => this._ruleName = value; } + + /// Creates an new instance. + public RecoveryPointProperties() + { + + } + } + /// Properties of Recovery Point + public partial interface IRecoveryPointProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Expiry time of Recovery Point in UTC. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Expiry time of Recovery Point in UTC.", + SerializedName = @"expiryTime", + PossibleTypes = new [] { typeof(string) })] + string ExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Bool to indicate whether RP is in soft delete state or not", + SerializedName = @"isSoftDeleted", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rule name tagged on Recovery Point that governs life cycle", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + string RuleName { get; set; } + + } + /// Properties of Recovery Point + internal partial interface IRecoveryPointPropertiesInternal + + { + /// Expiry time of Recovery Point in UTC. + string ExpiryTime { get; set; } + /// Bool to indicate whether RP is in soft delete state or not + bool? IsSoftDeleted { get; set; } + /// Rule name tagged on Recovery Point that governs life cycle + string RuleName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointProperties.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointProperties.json.cs new file mode 100644 index 000000000000..d74f1f3dc157 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointProperties.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Properties of Recovery Point + public partial class RecoveryPointProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryPointProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryPointProperties(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_expiryTime = If( json?.PropertyT("expiryTime"), out var __jsonExpiryTime) ? (string)__jsonExpiryTime : (string)ExpiryTime;} + {_ruleName = If( json?.PropertyT("ruleName"), out var __jsonRuleName) ? (string)__jsonRuleName : (string)RuleName;} + {_isSoftDeleted = If( json?.PropertyT("isSoftDeleted"), out var __jsonIsSoftDeleted) ? (bool?)__jsonIsSoftDeleted : IsSoftDeleted;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._expiryTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._expiryTime.ToString()) : null, "expiryTime" ,container.Add ); + AddIf( null != (((object)this._ruleName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._ruleName.ToString()) : null, "ruleName" ,container.Add ); + AddIf( null != this._isSoftDeleted ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isSoftDeleted) : null, "isSoftDeleted" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointRehydrationInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointRehydrationInfo.cs new file mode 100644 index 000000000000..b066efbf8298 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointRehydrationInfo.cs @@ -0,0 +1,78 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// RP Rehydration Info + public partial class RecoveryPointRehydrationInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? _rehydrationPriority; + + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RehydrationPriority { get => this._rehydrationPriority; set => this._rehydrationPriority = value; } + + /// Backing field for property. + private string _rehydrationRetentionDuration; + + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RehydrationRetentionDuration { get => this._rehydrationRetentionDuration; set => this._rehydrationRetentionDuration = value; } + + /// Creates an new instance. + public RecoveryPointRehydrationInfo() + { + + } + } + /// RP Rehydration Info + public partial interface IRecoveryPointRehydrationInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Rehydration Priority + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Rehydration Priority", + SerializedName = @"rehydrationPriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. ""P7D""", + SerializedName = @"rehydrationRetentionDuration", + PossibleTypes = new [] { typeof(string) })] + string RehydrationRetentionDuration { get; set; } + + } + /// RP Rehydration Info + internal partial interface IRecoveryPointRehydrationInfoInternal + + { + /// Rehydration Priority + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority? RehydrationPriority { get; set; } + /// + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + string RehydrationRetentionDuration { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointRehydrationInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointRehydrationInfo.json.cs new file mode 100644 index 000000000000..aafccb1c1f53 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointRehydrationInfo.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// RP Rehydration Info + public partial class RecoveryPointRehydrationInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointRehydrationInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryPointRehydrationInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryPointRehydrationInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_rehydrationRetentionDuration = If( json?.PropertyT("rehydrationRetentionDuration"), out var __jsonRehydrationRetentionDuration) ? (string)__jsonRehydrationRetentionDuration : (string)RehydrationRetentionDuration;} + {_rehydrationPriority = If( json?.PropertyT("rehydrationPriority"), out var __jsonRehydrationPriority) ? (string)__jsonRehydrationPriority : (string)RehydrationPriority;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._rehydrationRetentionDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._rehydrationRetentionDuration.ToString()) : null, "rehydrationRetentionDuration" ,container.Add ); + AddIf( null != (((object)this._rehydrationPriority)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._rehydrationPriority.ToString()) : null, "rehydrationPriority" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResource.cs new file mode 100644 index 000000000000..bcb63748f0eb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResource.cs @@ -0,0 +1,122 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup copies. Workload-specific backup copies are derived from this class. + /// + public partial class RecoveryPointResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)Property).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointInternal)Property).ObjectType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint _property; + + /// RecoveryPointResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint()); set => this._property = value; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public RecoveryPointResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Base class for backup copies. Workload-specific backup copies are derived from this class. + public partial interface IRecoveryPointResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Base class for backup copies. Workload-specific backup copies are derived from this class. + internal partial interface IRecoveryPointResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + /// RecoveryPointResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPoint Property { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResource.json.cs new file mode 100644 index 000000000000..ebeb9d1db5bf --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResource.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup copies. Workload-specific backup copies are derived from this class. + /// + public partial class RecoveryPointResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryPointResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryPointResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPoint.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResourceList.cs new file mode 100644 index 000000000000..f0752a936e80 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of RecoveryPoint resources + public partial class RecoveryPointResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public RecoveryPointResourceList() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + } + /// List of RecoveryPoint resources + public partial interface IRecoveryPointResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource[] Value { get; set; } + + } + /// List of RecoveryPoint resources + internal partial interface IRecoveryPointResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResourceList.json.cs new file mode 100644 index 000000000000..bbe3da5aede9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointResourceList.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of RecoveryPoint resources + public partial class RecoveryPointResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryPointResourceList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryPointResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformation.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformation.cs new file mode 100644 index 000000000000..0d7c2e5c8436 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformation.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point tier information. + public partial class RecoveryPointTierInformation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformation, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo _extendedInfo; + + /// Recovery point tier status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointTierInformationExtendedInfo()); set => this._extendedInfo = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus? _status; + + /// Recovery point tier status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus? Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? _type; + + /// Recovery point tier type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public RecoveryPointTierInformation() + { + + } + } + /// Recovery point tier information. + public partial interface IRecoveryPointTierInformation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Recovery point tier status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Recovery point tier status.", + SerializedName = @"extendedInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo ExtendedInfo { get; set; } + /// Recovery point tier status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Recovery point tier status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus? Status { get; set; } + /// Recovery point tier type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Recovery point tier type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? Type { get; set; } + + } + /// Recovery point tier information. + internal partial interface IRecoveryPointTierInformationInternal + + { + /// Recovery point tier status. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo ExtendedInfo { get; set; } + /// Recovery point tier status. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus? Status { get; set; } + /// Recovery point tier type. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformation.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformation.json.cs new file mode 100644 index 000000000000..546b837fbdc6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformation.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point tier information. + public partial class RecoveryPointTierInformation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformation FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryPointTierInformation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryPointTierInformation(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointTierInformationExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + 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 ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationExtendedInfo.cs new file mode 100644 index 000000000000..9eefc27d81e5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationExtendedInfo.cs @@ -0,0 +1,37 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point tier status. + public partial class RecoveryPointTierInformationExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfoInternal + { + + /// + /// Creates an new instance. + /// + public RecoveryPointTierInformationExtendedInfo() + { + + } + } + /// Recovery point tier status. + public partial interface IRecoveryPointTierInformationExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Recovery point tier status. + internal partial interface IRecoveryPointTierInformationExtendedInfoInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationExtendedInfo.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationExtendedInfo.dictionary.cs new file mode 100644 index 000000000000..a95f7e9d8a3f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationExtendedInfo.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class RecoveryPointTierInformationExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointTierInformationExtendedInfo source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationExtendedInfo.json.cs new file mode 100644 index 000000000000..d2c841819402 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationExtendedInfo.json.cs @@ -0,0 +1,111 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Recovery point tier status. + public partial class RecoveryPointTierInformationExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryPointTierInformationExtendedInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal RecoveryPointTierInformationExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationV2.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationV2.cs new file mode 100644 index 000000000000..b92f5b310753 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationV2.cs @@ -0,0 +1,65 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// RecoveryPoint Tier Information V2 + public partial class RecoveryPointTierInformationV2 : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2Internal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformation __recoveryPointTierInformation = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointTierInformation(); + + /// Recovery point tier status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationExtendedInfo ExtendedInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationInternal)__recoveryPointTierInformation).ExtendedInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationInternal)__recoveryPointTierInformation).ExtendedInfo = value ?? null /* model class */; } + + /// Recovery point tier status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationInternal)__recoveryPointTierInformation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationInternal)__recoveryPointTierInformation).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus)""); } + + /// Recovery point tier type. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationInternal)__recoveryPointTierInformation).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationInternal)__recoveryPointTierInformation).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType)""); } + + /// Creates an new instance. + public RecoveryPointTierInformationV2() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__recoveryPointTierInformation), __recoveryPointTierInformation); + await eventListener.AssertObjectIsValid(nameof(__recoveryPointTierInformation), __recoveryPointTierInformation); + } + } + /// RecoveryPoint Tier Information V2 + public partial interface IRecoveryPointTierInformationV2 : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformation + { + + } + /// RecoveryPoint Tier Information V2 + internal partial interface IRecoveryPointTierInformationV2Internal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationV2.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationV2.json.cs new file mode 100644 index 000000000000..ea46417b60ab --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RecoveryPointTierInformationV2.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// RecoveryPoint Tier Information V2 + public partial class RecoveryPointTierInformationV2 + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRecoveryPointTierInformationV2 FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryPointTierInformationV2(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryPointTierInformationV2(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __recoveryPointTierInformation = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointTierInformation(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __recoveryPointTierInformation?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Resource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Resource.cs new file mode 100644 index 000000000000..6a8b6adc1dc3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Resource.cs @@ -0,0 +1,151 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// ARM Resource. + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + + /// Backing field for property. + private string _eTag; + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ETag { get => this._eTag; set => this._eTag = value; } + + /// Backing field for property. + private string _id; + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Backing field for property. + private string _location; + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceTags()); set => this._tag = value; } + + /// Backing field for property. + private string _type; + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// ARM Resource. + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional ETag.", + SerializedName = @"eTag", + PossibleTypes = new [] { typeof(string) })] + string ETag { get; set; } + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource Id represents the complete path to the resource.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource location.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource name associated with the resource.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get; set; } + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// ARM Resource. + internal partial interface IResourceInternal + + { + /// Optional ETag. + string ETag { get; set; } + /// Resource Id represents the complete path to the resource. + string Id { get; set; } + /// Resource location. + string Location { get; set; } + /// Resource name associated with the resource. + string Name { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get; set; } + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Resource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Resource.json.cs new file mode 100644 index 000000000000..e04626a76176 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Resource.json.cs @@ -0,0 +1,127 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// ARM Resource. + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceTags.FromJson(__jsonTags) : Tag;} + {_eTag = If( json?.PropertyT("eTag"), out var __jsonETag) ? (string)__jsonETag : (string)ETag;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != (((object)this._eTag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._eTag.ToString()) : null, "eTag" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardOperationDetail.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardOperationDetail.cs new file mode 100644 index 000000000000..3e7a44e1cc5a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardOperationDetail.cs @@ -0,0 +1,61 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class ResourceGuardOperationDetail : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetailInternal + { + + /// Backing field for property. + private string _defaultResourceRequest; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DefaultResourceRequest { get => this._defaultResourceRequest; set => this._defaultResourceRequest = value; } + + /// Backing field for property. + private string _vaultCriticalOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VaultCriticalOperation { get => this._vaultCriticalOperation; set => this._vaultCriticalOperation = value; } + + /// Creates an new instance. + public ResourceGuardOperationDetail() + { + + } + } + public partial interface IResourceGuardOperationDetail : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"defaultResourceRequest", + PossibleTypes = new [] { typeof(string) })] + string DefaultResourceRequest { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"vaultCriticalOperation", + PossibleTypes = new [] { typeof(string) })] + string VaultCriticalOperation { get; set; } + + } + internal partial interface IResourceGuardOperationDetailInternal + + { + string DefaultResourceRequest { get; set; } + + string VaultCriticalOperation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardOperationDetail.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardOperationDetail.json.cs new file mode 100644 index 000000000000..862588a1f005 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardOperationDetail.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class ResourceGuardOperationDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ResourceGuardOperationDetail(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceGuardOperationDetail(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_vaultCriticalOperation = If( json?.PropertyT("vaultCriticalOperation"), out var __jsonVaultCriticalOperation) ? (string)__jsonVaultCriticalOperation : (string)VaultCriticalOperation;} + {_defaultResourceRequest = If( json?.PropertyT("defaultResourceRequest"), out var __jsonDefaultResourceRequest) ? (string)__jsonDefaultResourceRequest : (string)DefaultResourceRequest;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._vaultCriticalOperation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._vaultCriticalOperation.ToString()) : null, "vaultCriticalOperation" ,container.Add ); + AddIf( null != (((object)this._defaultResourceRequest)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._defaultResourceRequest.ToString()) : null, "defaultResourceRequest" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBase.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBase.cs new file mode 100644 index 000000000000..6227a6976119 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBase.cs @@ -0,0 +1,93 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class ResourceGuardProxyBase : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBase, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseInternal + { + + /// Backing field for property. + private string _description; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _lastUpdatedTime; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LastUpdatedTime { get => this._lastUpdatedTime; set => this._lastUpdatedTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail[] _resourceGuardOperationDetail; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail[] ResourceGuardOperationDetail { get => this._resourceGuardOperationDetail; set => this._resourceGuardOperationDetail = value; } + + /// Backing field for property. + private string _resourceGuardResourceId; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceGuardResourceId { get => this._resourceGuardResourceId; set => this._resourceGuardResourceId = value; } + + /// Creates an new instance. + public ResourceGuardProxyBase() + { + + } + } + public partial interface IResourceGuardProxyBase : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"lastUpdatedTime", + PossibleTypes = new [] { typeof(string) })] + string LastUpdatedTime { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"resourceGuardOperationDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail[] ResourceGuardOperationDetail { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"resourceGuardResourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceGuardResourceId { get; set; } + + } + internal partial interface IResourceGuardProxyBaseInternal + + { + string Description { get; set; } + + string LastUpdatedTime { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail[] ResourceGuardOperationDetail { get; set; } + + string ResourceGuardResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBase.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBase.json.cs new file mode 100644 index 000000000000..b1b05c71dc01 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBase.json.cs @@ -0,0 +1,121 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class ResourceGuardProxyBase + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBase. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBase. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ResourceGuardProxyBase(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceGuardProxyBase(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceGuardResourceId = If( json?.PropertyT("resourceGuardResourceId"), out var __jsonResourceGuardResourceId) ? (string)__jsonResourceGuardResourceId : (string)ResourceGuardResourceId;} + {_resourceGuardOperationDetail = If( json?.PropertyT("resourceGuardOperationDetails"), out var __jsonResourceGuardOperationDetails) ? If( __jsonResourceGuardOperationDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceGuardOperationDetail.FromJson(__u) )) ))() : null : ResourceGuardOperationDetail;} + {_lastUpdatedTime = If( json?.PropertyT("lastUpdatedTime"), out var __jsonLastUpdatedTime) ? (string)__jsonLastUpdatedTime : (string)LastUpdatedTime;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._resourceGuardResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceGuardResourceId.ToString()) : null, "resourceGuardResourceId" ,container.Add ); + if (null != this._resourceGuardOperationDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourceGuardOperationDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("resourceGuardOperationDetails",__w); + } + AddIf( null != (((object)this._lastUpdatedTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._lastUpdatedTime.ToString()) : null, "lastUpdatedTime" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResource.cs new file mode 100644 index 000000000000..8c77ffdb2415 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResource.cs @@ -0,0 +1,147 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class ResourceGuardProxyBaseResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseInternal)Property).Description = value ?? null; } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string LastUpdatedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseInternal)Property).LastUpdatedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseInternal)Property).LastUpdatedTime = value ?? null; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBase Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceGuardProxyBase()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBase _property; + + /// ResourceGuardProxyBaseResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBase Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceGuardProxyBase()); set => this._property = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail[] ResourceGuardOperationDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseInternal)Property).ResourceGuardOperationDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseInternal)Property).ResourceGuardOperationDetail = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ResourceGuardResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseInternal)Property).ResourceGuardResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseInternal)Property).ResourceGuardResourceId = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ResourceGuardProxyBaseResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + public partial interface IResourceGuardProxyBaseResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"lastUpdatedTime", + PossibleTypes = new [] { typeof(string) })] + string LastUpdatedTime { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"resourceGuardOperationDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail[] ResourceGuardOperationDetail { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"resourceGuardResourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceGuardResourceId { get; set; } + + } + internal partial interface IResourceGuardProxyBaseResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + string Description { get; set; } + + string LastUpdatedTime { get; set; } + /// ResourceGuardProxyBaseResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBase Property { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardOperationDetail[] ResourceGuardOperationDetail { get; set; } + + string ResourceGuardResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResource.json.cs new file mode 100644 index 000000000000..d41ecf33c002 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResource.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class ResourceGuardProxyBaseResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ResourceGuardProxyBaseResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceGuardProxyBaseResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceGuardProxyBase.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResourceList.cs new file mode 100644 index 000000000000..e11ee3c4f137 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ResourceGuardProxyBase resources + public partial class ResourceGuardProxyBaseResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ResourceGuardProxyBaseResourceList() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + } + /// List of ResourceGuardProxyBase resources + public partial interface IResourceGuardProxyBaseResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource[] Value { get; set; } + + } + /// List of ResourceGuardProxyBase resources + internal partial interface IResourceGuardProxyBaseResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResourceList.json.cs new file mode 100644 index 000000000000..6a87adeae54a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceGuardProxyBaseResourceList.json.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of ResourceGuardProxyBase resources + public partial class ResourceGuardProxyBaseResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ResourceGuardProxyBaseResourceList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceGuardProxyBaseResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceGuardProxyBaseResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceHealthDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceHealthDetails.cs new file mode 100644 index 000000000000..bc721750236b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceHealthDetails.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Health Details for backup items. + public partial class ResourceHealthDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal + { + + /// Backing field for property. + private int? _code; + + /// Health Code + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Code { get => this._code; } + + /// Backing field for property. + private string _message; + + /// Health Message + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for Code + int? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Recommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal.Recommendation { get => this._recommendation; set { {_recommendation = value;} } } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetailsInternal.Title { get => this._title; set { {_title = value;} } } + + /// Backing field for property. + private string[] _recommendation; + + /// Health Recommended Actions + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Recommendation { get => this._recommendation; } + + /// Backing field for property. + private string _title; + + /// Health Title + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Title { get => this._title; } + + /// Creates an new instance. + public ResourceHealthDetails() + { + + } + } + /// Health Details for backup items. + public partial interface IResourceHealthDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Health Code + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Health Code", + SerializedName = @"code", + PossibleTypes = new [] { typeof(int) })] + int? Code { get; } + /// Health Message + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Health Message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// Health Recommended Actions + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Health Recommended Actions", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] Recommendation { get; } + /// Health Title + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Health Title", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; } + + } + /// Health Details for backup items. + internal partial interface IResourceHealthDetailsInternal + + { + /// Health Code + int? Code { get; set; } + /// Health Message + string Message { get; set; } + /// Health Recommended Actions + string[] Recommendation { get; set; } + /// Health Title + string Title { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceHealthDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceHealthDetails.json.cs new file mode 100644 index 000000000000..0cf3752009ef --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceHealthDetails.json.cs @@ -0,0 +1,134 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Health Details for backup items. + public partial class ResourceHealthDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceHealthDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ResourceHealthDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceHealthDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (int?)__jsonCode : Code;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_recommendation = If( json?.PropertyT("recommendations"), out var __jsonRecommendations) ? If( __jsonRecommendations as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Recommendation;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._code ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._code) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._recommendation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recommendation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("recommendations",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceList.cs new file mode 100644 index 000000000000..c08da9760b53 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceList.cs @@ -0,0 +1,60 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base for all lists of resources. + public partial class ResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + + /// Backing field for property. + private string _nextLink; + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Creates an new instance. + public ResourceList() + { + + } + } + /// Base for all lists of resources. + public partial interface IResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + + } + /// Base for all lists of resources. + internal partial interface IResourceListInternal + + { + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + string NextLink { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceList.json.cs new file mode 100644 index 000000000000..9e5a6c350415 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceList.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base for all lists of resources. + public partial class ResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ResourceList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceTags.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceTags.cs new file mode 100644 index 000000000000..0e9a9a3a5a04 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceTags.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Resource tags. + public partial class ResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTagsInternal + { + + /// Creates an new instance. + public ResourceTags() + { + + } + } + /// Resource tags. + public partial interface IResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface IResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceTags.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceTags.dictionary.cs new file mode 100644 index 000000000000..723200087918 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceTags.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class ResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceTags.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceTags.json.cs new file mode 100644 index 000000000000..28e23c74c8fa --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ResourceTags.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Resource tags. + public partial class ResourceTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ResourceTags(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal ResourceTags(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreFileSpecs.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreFileSpecs.cs new file mode 100644 index 000000000000..addcd6eb6f66 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreFileSpecs.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Restore file specs like file path, type and target folder path info. + public partial class RestoreFileSpecs : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecsInternal + { + + /// Backing field for property. + private string _fileSpecType; + + /// Indicates what the Path variable stands for + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FileSpecType { get => this._fileSpecType; set => this._fileSpecType = value; } + + /// Backing field for property. + private string _path; + + /// Source File/Folder path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Path { get => this._path; set => this._path = value; } + + /// Backing field for property. + private string _targetFolderPath; + + /// Destination folder path in target FileShare + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetFolderPath { get => this._targetFolderPath; set => this._targetFolderPath = value; } + + /// Creates an new instance. + public RestoreFileSpecs() + { + + } + } + /// Restore file specs like file path, type and target folder path info. + public partial interface IRestoreFileSpecs : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Indicates what the Path variable stands for + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates what the Path variable stands for", + SerializedName = @"fileSpecType", + PossibleTypes = new [] { typeof(string) })] + string FileSpecType { get; set; } + /// Source File/Folder path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source File/Folder path", + SerializedName = @"path", + PossibleTypes = new [] { typeof(string) })] + string Path { get; set; } + /// Destination folder path in target FileShare + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Destination folder path in target FileShare", + SerializedName = @"targetFolderPath", + PossibleTypes = new [] { typeof(string) })] + string TargetFolderPath { get; set; } + + } + /// Restore file specs like file path, type and target folder path info. + internal partial interface IRestoreFileSpecsInternal + + { + /// Indicates what the Path variable stands for + string FileSpecType { get; set; } + /// Source File/Folder path + string Path { get; set; } + /// Destination folder path in target FileShare + string TargetFolderPath { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreFileSpecs.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreFileSpecs.json.cs new file mode 100644 index 000000000000..c198a63c2a8c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreFileSpecs.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Restore file specs like file path, type and target folder path info. + public partial class RestoreFileSpecs + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreFileSpecs FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RestoreFileSpecs(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RestoreFileSpecs(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)Path;} + {_fileSpecType = If( json?.PropertyT("fileSpecType"), out var __jsonFileSpecType) ? (string)__jsonFileSpecType : (string)FileSpecType;} + {_targetFolderPath = If( json?.PropertyT("targetFolderPath"), out var __jsonTargetFolderPath) ? (string)__jsonTargetFolderPath : (string)TargetFolderPath;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._path)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._path.ToString()) : null, "path" ,container.Add ); + AddIf( null != (((object)this._fileSpecType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fileSpecType.ToString()) : null, "fileSpecType" ,container.Add ); + AddIf( null != (((object)this._targetFolderPath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetFolderPath.ToString()) : null, "targetFolderPath" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequest.cs new file mode 100644 index 000000000000..ee8c4dc4b4e2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequest.cs @@ -0,0 +1,76 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for restore request. Workload-specific restore requests are derived from this class. + /// + public partial class RestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Backing field for property. + private string[] _resourceGuardOperationRequest; + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] ResourceGuardOperationRequest { get => this._resourceGuardOperationRequest; set => this._resourceGuardOperationRequest = value; } + + /// Creates an new instance. + public RestoreRequest() + { + + } + } + /// Base class for restore request. Workload-specific restore requests are derived from this class. + public partial interface IRestoreRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuardOperationRequests on which LAC check will be performed", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + + } + /// Base class for restore request. Workload-specific restore requests are derived from this class. + internal partial interface IRestoreRequestInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + string[] ResourceGuardOperationRequest { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequest.json.cs new file mode 100644 index 000000000000..a6c7691604f0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequest.json.cs @@ -0,0 +1,183 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for restore request. Workload-specific restore requests are derived from this class. + /// + public partial class RestoreRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "AzureFileShareRestoreRequest": + { + return new AzureFileShareRestoreRequest(json); + } + case "AzureWorkloadRestoreRequest": + { + return new AzureWorkloadRestoreRequest(json); + } + case "AzureWorkloadPointInTimeRestoreRequest": + { + return new AzureWorkloadPointInTimeRestoreRequest(json); + } + case "AzureWorkloadSAPHanaPointInTimeRestoreRequest": + { + return new AzureWorkloadSapHanaPointInTimeRestoreRequest(json); + } + case "AzureWorkloadSAPHanaRestoreRequest": + { + return new AzureWorkloadSapHanaRestoreRequest(json); + } + case "AzureWorkloadSQLRestoreRequest": + { + return new AzureWorkloadSqlRestoreRequest(json); + } + case "AzureWorkloadSQLPointInTimeRestoreRequest": + { + return new AzureWorkloadSqlPointInTimeRestoreRequest(json); + } + case "IaasVMRestoreRequest": + { + return new IaasVMRestoreRequest(json); + } + case "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest": + { + return new AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest(json); + } + case "AzureWorkloadSAPHanaRestoreWithRehydrateRequest": + { + return new AzureWorkloadSapHanaRestoreWithRehydrateRequest(json); + } + case "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest": + { + return new AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest(json); + } + case "AzureWorkloadSQLRestoreWithRehydrateRequest": + { + return new AzureWorkloadSqlRestoreWithRehydrateRequest(json); + } + case "IaasVMRestoreWithRehydrationRequest": + { + return new IaasVMRestoreWithRehydrationRequest(json); + } + } + return new RestoreRequest(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RestoreRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + {_resourceGuardOperationRequest = If( json?.PropertyT("resourceGuardOperationRequests"), out var __jsonResourceGuardOperationRequests) ? If( __jsonResourceGuardOperationRequests as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ResourceGuardOperationRequest;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + if (null != this._resourceGuardOperationRequest) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourceGuardOperationRequest ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("resourceGuardOperationRequests",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequestResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequestResource.cs new file mode 100644 index 000000000000..c733fc67c1d8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequestResource.cs @@ -0,0 +1,136 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for restore request. Workload-specific restore requests are derived from this class. + /// + public partial class RestoreRequestResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest()); set { {_property = value;} } } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)Property).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)Property).ObjectType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest _property; + + /// RestoreRequestResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest()); set => this._property = value; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)Property).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)Property).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public RestoreRequestResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Base class for restore request. Workload-specific restore requests are derived from this class. + public partial interface IRestoreRequestResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuardOperationRequests on which LAC check will be performed", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + + } + /// Base class for restore request. Workload-specific restore requests are derived from this class. + internal partial interface IRestoreRequestResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + /// RestoreRequestResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest Property { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + string[] ResourceGuardOperationRequest { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequestResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequestResource.json.cs new file mode 100644 index 000000000000..64fd29214a7f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RestoreRequestResource.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for restore request. Workload-specific restore requests are derived from this class. + /// + public partial class RestoreRequestResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RestoreRequestResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RestoreRequestResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionDuration.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionDuration.cs new file mode 100644 index 000000000000..8bca078f6d68 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionDuration.cs @@ -0,0 +1,78 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Retention duration. + public partial class RetentionDuration : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal + { + + /// Backing field for property. + private int? _count; + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Count { get => this._count; set => this._count = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? _durationType; + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? DurationType { get => this._durationType; set => this._durationType = value; } + + /// Creates an new instance. + public RetentionDuration() + { + + } + } + /// Retention duration. + public partial interface IRetentionDuration : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? DurationType { get; set; } + + } + /// Retention duration. + internal partial interface IRetentionDurationInternal + + { + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? Count { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? DurationType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionDuration.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionDuration.json.cs new file mode 100644 index 000000000000..498ca9a723e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionDuration.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Retention duration. + public partial class RetentionDuration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RetentionDuration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RetentionDuration(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_count = If( json?.PropertyT("count"), out var __jsonCount) ? (int?)__jsonCount : Count;} + {_durationType = If( json?.PropertyT("durationType"), out var __jsonDurationType) ? (string)__jsonDurationType : (string)DurationType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._count ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._count) : null, "count" ,container.Add ); + AddIf( null != (((object)this._durationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._durationType.ToString()) : null, "durationType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionPolicy.cs new file mode 100644 index 000000000000..4dc11e8374df --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionPolicy.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for retention policy. + public partial class RetentionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal + { + + /// Backing field for property. + private string _type; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public RetentionPolicy() + { + + } + } + /// Base class for retention policy. + public partial interface IRetentionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"retentionPolicyType", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// Base class for retention policy. + internal partial interface IRetentionPolicyInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionPolicy.json.cs new file mode 100644 index 000000000000..1dbaaf64b2a9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/RetentionPolicy.json.cs @@ -0,0 +1,127 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for retention policy. + public partial class RetentionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("retentionPolicyType") ) + { + case "LongTermRetentionPolicy": + { + return new LongTermRetentionPolicy(json); + } + case "SimpleRetentionPolicy": + { + return new SimpleRetentionPolicy(json); + } + } + return new RetentionPolicy(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RetentionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("retentionPolicyType"), out var __jsonRetentionPolicyType) ? (string)__jsonRetentionPolicyType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + 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, "retentionPolicyType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SchedulePolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SchedulePolicy.cs new file mode 100644 index 000000000000..cb57f76c3a6c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SchedulePolicy.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup schedule. + public partial class SchedulePolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal + { + + /// Backing field for property. + private string _type; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public SchedulePolicy() + { + + } + } + /// Base class for backup schedule. + public partial interface ISchedulePolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"schedulePolicyType", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// Base class for backup schedule. + internal partial interface ISchedulePolicyInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SchedulePolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SchedulePolicy.json.cs new file mode 100644 index 000000000000..5014c68b6c9b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SchedulePolicy.json.cs @@ -0,0 +1,135 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for backup schedule. + public partial class SchedulePolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("schedulePolicyType") ) + { + case "LogSchedulePolicy": + { + return new LogSchedulePolicy(json); + } + case "LongTermSchedulePolicy": + { + return new LongTermSchedulePolicy(json); + } + case "SimpleSchedulePolicy": + { + return new SimpleSchedulePolicy(json); + } + case "SimpleSchedulePolicyV2": + { + return new SimpleSchedulePolicyV2(json); + } + } + return new SchedulePolicy(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SchedulePolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("schedulePolicyType"), out var __jsonSchedulePolicyType) ? (string)__jsonSchedulePolicyType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + 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, "schedulePolicyType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecuredVMDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecuredVMDetails.cs new file mode 100644 index 000000000000..4616096474df --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecuredVMDetails.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Restore request parameters for Secured VMs + public partial class SecuredVMDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetailsInternal + { + + /// Backing field for property. + private string _securedVmosDiskEncryptionSetId; + + /// Gets or Sets Disk Encryption Set Id for Secured VM OS Disk + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SecuredVmosDiskEncryptionSetId { get => this._securedVmosDiskEncryptionSetId; set => this._securedVmosDiskEncryptionSetId = value; } + + /// Creates an new instance. + public SecuredVMDetails() + { + + } + } + /// Restore request parameters for Secured VMs + public partial interface ISecuredVMDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Gets or Sets Disk Encryption Set Id for Secured VM OS Disk + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or Sets Disk Encryption Set Id for Secured VM OS Disk", + SerializedName = @"securedVMOsDiskEncryptionSetId", + PossibleTypes = new [] { typeof(string) })] + string SecuredVmosDiskEncryptionSetId { get; set; } + + } + /// Restore request parameters for Secured VMs + internal partial interface ISecuredVMDetailsInternal + + { + /// Gets or Sets Disk Encryption Set Id for Secured VM OS Disk + string SecuredVmosDiskEncryptionSetId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecuredVMDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecuredVMDetails.json.cs new file mode 100644 index 000000000000..4ceba018863e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecuredVMDetails.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Restore request parameters for Secured VMs + public partial class SecuredVMDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecuredVMDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SecuredVMDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SecuredVMDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_securedVmosDiskEncryptionSetId = If( json?.PropertyT("securedVMOsDiskEncryptionSetId"), out var __jsonSecuredVMOSDiskEncryptionSetId) ? (string)__jsonSecuredVMOSDiskEncryptionSetId : (string)SecuredVmosDiskEncryptionSetId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._securedVmosDiskEncryptionSetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._securedVmosDiskEncryptionSetId.ToString()) : null, "securedVMOsDiskEncryptionSetId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecurityPinBase.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecurityPinBase.cs new file mode 100644 index 000000000000..7f6bb71ce262 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecurityPinBase.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for get security pin request body + public partial class SecurityPinBase : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecurityPinBase, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecurityPinBaseInternal + { + + /// Backing field for property. + private string[] _resourceGuardOperationRequest; + + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] ResourceGuardOperationRequest { get => this._resourceGuardOperationRequest; set => this._resourceGuardOperationRequest = value; } + + /// Creates an new instance. + public SecurityPinBase() + { + + } + } + /// Base class for get security pin request body + public partial interface ISecurityPinBase : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// ResourceGuard Operation Requests + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuard Operation Requests", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + + } + /// Base class for get security pin request body + internal partial interface ISecurityPinBaseInternal + + { + /// ResourceGuard Operation Requests + string[] ResourceGuardOperationRequest { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecurityPinBase.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecurityPinBase.json.cs new file mode 100644 index 000000000000..67bb08274809 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SecurityPinBase.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for get security pin request body + public partial class SecurityPinBase + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecurityPinBase. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecurityPinBase. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecurityPinBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SecurityPinBase(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SecurityPinBase(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceGuardOperationRequest = If( json?.PropertyT("resourceGuardOperationRequests"), out var __jsonResourceGuardOperationRequests) ? If( __jsonResourceGuardOperationRequests as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ResourceGuardOperationRequest;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._resourceGuardOperationRequest) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourceGuardOperationRequest ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("resourceGuardOperationRequests",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Settings.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Settings.cs new file mode 100644 index 000000000000..db2c521650ff --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Settings.cs @@ -0,0 +1,101 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Common settings field for backup management + public partial class Settings : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettings, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettingsInternal + { + + /// Backing field for property. + private bool? _isCompression; + + /// + /// Workload compression flag. This has been added so that 'isSqlCompression' + /// will be deprecated once clients upgrade to consider this flag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? IsCompression { get => this._isCompression; set => this._isCompression = value; } + + /// Backing field for property. + private bool? _issqlcompression; + + /// SQL compression flag + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? Issqlcompression { get => this._issqlcompression; set => this._issqlcompression = value; } + + /// Backing field for property. + private string _timeZone; + + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Creates an new instance. + public Settings() + { + + } + } + /// Common settings field for backup management + public partial interface ISettings : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// Workload compression flag. This has been added so that 'isSqlCompression' + /// will be deprecated once clients upgrade to consider this flag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Workload compression flag. This has been added so that 'isSqlCompression' + will be deprecated once clients upgrade to consider this flag.", + SerializedName = @"isCompression", + PossibleTypes = new [] { typeof(bool) })] + bool? IsCompression { get; set; } + /// SQL compression flag + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SQL compression flag", + SerializedName = @"issqlcompression", + PossibleTypes = new [] { typeof(bool) })] + bool? Issqlcompression { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"TimeZone optional input as string. For example: TimeZone = ""Pacific Standard Time"".", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + + } + /// Common settings field for backup management + internal partial interface ISettingsInternal + + { + /// + /// Workload compression flag. This has been added so that 'isSqlCompression' + /// will be deprecated once clients upgrade to consider this flag. + /// + bool? IsCompression { get; set; } + /// SQL compression flag + bool? Issqlcompression { get; set; } + /// + /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + /// + string TimeZone { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Settings.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Settings.json.cs new file mode 100644 index 000000000000..be6b825b330e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/Settings.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Common settings field for backup management + public partial class Settings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new Settings(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal Settings(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + {_issqlcompression = If( json?.PropertyT("issqlcompression"), out var __jsonIssqlcompression) ? (bool?)__jsonIssqlcompression : Issqlcompression;} + {_isCompression = If( json?.PropertyT("isCompression"), out var __jsonIsCompression) ? (bool?)__jsonIsCompression : IsCompression;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + AddIf( null != this._issqlcompression ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._issqlcompression) : null, "issqlcompression" ,container.Add ); + AddIf( null != this._isCompression ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._isCompression) : null, "isCompression" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleRetentionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleRetentionPolicy.cs new file mode 100644 index 000000000000..91848096330c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleRetentionPolicy.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Simple policy retention. + public partial class SimpleRetentionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleRetentionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleRetentionPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy __retentionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy(); + + /// Internal Acessors for RetentionDuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleRetentionPolicyInternal.RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set { {_retentionDuration = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration _retentionDuration; + + /// Retention duration of the protection policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set => this._retentionDuration = value; } + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? RetentionDurationCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count = value ?? default(int); } + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType)""); } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)__retentionPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)__retentionPolicy).Type = value ; } + + /// Creates an new instance. + public SimpleRetentionPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__retentionPolicy), __retentionPolicy); + await eventListener.AssertObjectIsValid(nameof(__retentionPolicy), __retentionPolicy); + } + } + /// Simple policy retention. + public partial interface ISimpleRetentionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy + { + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + + } + /// Simple policy retention. + internal partial interface ISimpleRetentionPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal + { + /// Retention duration of the protection policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleRetentionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleRetentionPolicy.json.cs new file mode 100644 index 000000000000..850e9d3dabfc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleRetentionPolicy.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Simple policy retention. + public partial class SimpleRetentionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleRetentionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleRetentionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleRetentionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SimpleRetentionPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SimpleRetentionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __retentionPolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy(json); + {_retentionDuration = If( json?.PropertyT("retentionDuration"), out var __jsonRetentionDuration) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration.FromJson(__jsonRetentionDuration) : RetentionDuration;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __retentionPolicy?.ToJson(container, serializationMode); + AddIf( null != this._retentionDuration ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionDuration.ToJson(null,serializationMode) : null, "retentionDuration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicy.cs new file mode 100644 index 000000000000..13d915fa708b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicy.cs @@ -0,0 +1,191 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Simple policy schedule. + public partial class SimpleSchedulePolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy __schedulePolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule _hourlySchedule; + + /// Hourly Schedule of this Policy + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule HourlySchedule { get => (this._hourlySchedule = this._hourlySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.HourlySchedule()); set => this._hourlySchedule = value; } + + /// + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? HourlyScheduleInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).Interval = value ?? default(int); } + + /// To specify duration of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? HourlyScheduleWindowDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).ScheduleWindowDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).ScheduleWindowDuration = value ?? default(int); } + + /// To specify start time of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? HourlyScheduleWindowStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).ScheduleWindowStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).ScheduleWindowStartTime = value ?? default(global::System.DateTime); } + + /// Internal Acessors for HourlySchedule + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyInternal.HourlySchedule { get => (this._hourlySchedule = this._hourlySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.HourlySchedule()); set { {_hourlySchedule = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] _scheduleRunDay; + + /// List of days of week this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] ScheduleRunDay { get => this._scheduleRunDay; set => this._scheduleRunDay = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType? _scheduleRunFrequency; + + /// Frequency of the schedule operation of this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType? ScheduleRunFrequency { get => this._scheduleRunFrequency; set => this._scheduleRunFrequency = value; } + + /// Backing field for property. + private global::System.DateTime[] _scheduleRunTime; + + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime[] ScheduleRunTime { get => this._scheduleRunTime; set => this._scheduleRunTime = value; } + + /// Backing field for property. + private int? _scheduleWeeklyFrequency; + + /// At every number weeks this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ScheduleWeeklyFrequency { get => this._scheduleWeeklyFrequency; set => this._scheduleWeeklyFrequency = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)__schedulePolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)__schedulePolicy).Type = value ; } + + /// Creates an new instance. + public SimpleSchedulePolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__schedulePolicy), __schedulePolicy); + await eventListener.AssertObjectIsValid(nameof(__schedulePolicy), __schedulePolicy); + } + } + /// Simple policy schedule. + public partial interface ISimpleSchedulePolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy + { + /// + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Interval at which backup needs to be triggered. For hourly the value + can be 4/6/8/12", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? HourlyScheduleInterval { get; set; } + /// To specify duration of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To specify duration of the backup window", + SerializedName = @"scheduleWindowDuration", + PossibleTypes = new [] { typeof(int) })] + int? HourlyScheduleWindowDuration { get; set; } + /// To specify start time of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To specify start time of the backup window", + SerializedName = @"scheduleWindowStartTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? HourlyScheduleWindowStartTime { get; set; } + /// List of days of week this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of week this schedule has to be run.", + SerializedName = @"scheduleRunDays", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] ScheduleRunDay { get; set; } + /// Frequency of the schedule operation of this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Frequency of the schedule operation of this policy.", + SerializedName = @"scheduleRunFrequency", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType? ScheduleRunFrequency { get; set; } + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of times of day this schedule has to be run.", + SerializedName = @"scheduleRunTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] ScheduleRunTime { get; set; } + /// At every number weeks this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"At every number weeks this schedule has to be run.", + SerializedName = @"scheduleWeeklyFrequency", + PossibleTypes = new [] { typeof(int) })] + int? ScheduleWeeklyFrequency { get; set; } + + } + /// Simple policy schedule. + internal partial interface ISimpleSchedulePolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal + { + /// Hourly Schedule of this Policy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule HourlySchedule { get; set; } + /// + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + int? HourlyScheduleInterval { get; set; } + /// To specify duration of the backup window + int? HourlyScheduleWindowDuration { get; set; } + /// To specify start time of the backup window + global::System.DateTime? HourlyScheduleWindowStartTime { get; set; } + /// List of days of week this schedule has to be run. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] ScheduleRunDay { get; set; } + /// Frequency of the schedule operation of this policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType? ScheduleRunFrequency { get; set; } + /// List of times of day this schedule has to be run. + global::System.DateTime[] ScheduleRunTime { get; set; } + /// At every number weeks this schedule has to be run. + int? ScheduleWeeklyFrequency { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicy.json.cs new file mode 100644 index 000000000000..4acd5982ac9a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicy.json.cs @@ -0,0 +1,134 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Simple policy schedule. + public partial class SimpleSchedulePolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SimpleSchedulePolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SimpleSchedulePolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __schedulePolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy(json); + {_hourlySchedule = If( json?.PropertyT("hourlySchedule"), out var __jsonHourlySchedule) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.HourlySchedule.FromJson(__jsonHourlySchedule) : HourlySchedule;} + {_scheduleRunFrequency = If( json?.PropertyT("scheduleRunFrequency"), out var __jsonScheduleRunFrequency) ? (string)__jsonScheduleRunFrequency : (string)ScheduleRunFrequency;} + {_scheduleRunDay = If( json?.PropertyT("scheduleRunDays"), out var __jsonScheduleRunDays) ? If( __jsonScheduleRunDays as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek)""))) ))() : null : ScheduleRunDay;} + {_scheduleRunTime = If( json?.PropertyT("scheduleRunTimes"), out var __jsonScheduleRunTimes) ? If( __jsonScheduleRunTimes as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(global::System.DateTime) (__p is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __o ? global::System.DateTime.TryParse((string)__o, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __oValue) ? __oValue : default(global::System.DateTime) : default(global::System.DateTime))) ))() : null : ScheduleRunTime;} + {_scheduleWeeklyFrequency = If( json?.PropertyT("scheduleWeeklyFrequency"), out var __jsonScheduleWeeklyFrequency) ? (int?)__jsonScheduleWeeklyFrequency : ScheduleWeeklyFrequency;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __schedulePolicy?.ToJson(container, serializationMode); + AddIf( null != this._hourlySchedule ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._hourlySchedule.ToJson(null,serializationMode) : null, "hourlySchedule" ,container.Add ); + AddIf( null != (((object)this._scheduleRunFrequency)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._scheduleRunFrequency.ToString()) : null, "scheduleRunFrequency" ,container.Add ); + if (null != this._scheduleRunDay) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._scheduleRunDay ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("scheduleRunDays",__w); + } + if (null != this._scheduleRunTime) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._scheduleRunTime ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__s.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) ,__r.Add); + } + container.Add("scheduleRunTimes",__r); + } + AddIf( null != this._scheduleWeeklyFrequency ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._scheduleWeeklyFrequency) : null, "scheduleWeeklyFrequency" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicyV2.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicyV2.cs new file mode 100644 index 000000000000..817fe903c9c9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicyV2.cs @@ -0,0 +1,205 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The V2 policy schedule for IaaS that supports hourly backups. + public partial class SimpleSchedulePolicyV2 : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyV2, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyV2Internal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy __schedulePolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailySchedule _dailySchedule; + + /// Daily schedule of this policy + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailySchedule DailySchedule { get => (this._dailySchedule = this._dailySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailySchedule()); set => this._dailySchedule = value; } + + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime[] DailyScheduleRunTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyScheduleInternal)DailySchedule).ScheduleRunTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyScheduleInternal)DailySchedule).ScheduleRunTime = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule _hourlySchedule; + + /// hourly schedule of this policy + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule HourlySchedule { get => (this._hourlySchedule = this._hourlySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.HourlySchedule()); set => this._hourlySchedule = value; } + + /// + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? HourlyScheduleInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).Interval = value ?? default(int); } + + /// To specify duration of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? HourlyScheduleWindowDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).ScheduleWindowDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).ScheduleWindowDuration = value ?? default(int); } + + /// To specify start time of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime? HourlyScheduleWindowStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).ScheduleWindowStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlyScheduleInternal)HourlySchedule).ScheduleWindowStartTime = value ?? default(global::System.DateTime); } + + /// Internal Acessors for DailySchedule + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailySchedule Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyV2Internal.DailySchedule { get => (this._dailySchedule = this._dailySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailySchedule()); set { {_dailySchedule = value;} } } + + /// Internal Acessors for HourlySchedule + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyV2Internal.HourlySchedule { get => (this._hourlySchedule = this._hourlySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.HourlySchedule()); set { {_hourlySchedule = value;} } } + + /// Internal Acessors for WeeklySchedule + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklySchedule Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyV2Internal.WeeklySchedule { get => (this._weeklySchedule = this._weeklySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklySchedule()); set { {_weeklySchedule = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType? _scheduleRunFrequency; + + /// Frequency of the schedule operation of this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType? ScheduleRunFrequency { get => this._scheduleRunFrequency; set => this._scheduleRunFrequency = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)__schedulePolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)__schedulePolicy).Type = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklySchedule _weeklySchedule; + + /// Weekly schedule of this policy + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklySchedule WeeklySchedule { get => (this._weeklySchedule = this._weeklySchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklySchedule()); set => this._weeklySchedule = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] WeeklyScheduleRunDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyScheduleInternal)WeeklySchedule).ScheduleRunDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyScheduleInternal)WeeklySchedule).ScheduleRunDay = value ?? null /* arrayOf */; } + + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public global::System.DateTime[] WeeklyScheduleRunTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyScheduleInternal)WeeklySchedule).ScheduleRunTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyScheduleInternal)WeeklySchedule).ScheduleRunTime = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public SimpleSchedulePolicyV2() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__schedulePolicy), __schedulePolicy); + await eventListener.AssertObjectIsValid(nameof(__schedulePolicy), __schedulePolicy); + } + } + /// The V2 policy schedule for IaaS that supports hourly backups. + public partial interface ISimpleSchedulePolicyV2 : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy + { + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of times of day this schedule has to be run.", + SerializedName = @"scheduleRunTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] DailyScheduleRunTime { get; set; } + /// + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Interval at which backup needs to be triggered. For hourly the value + can be 4/6/8/12", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? HourlyScheduleInterval { get; set; } + /// To specify duration of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To specify duration of the backup window", + SerializedName = @"scheduleWindowDuration", + PossibleTypes = new [] { typeof(int) })] + int? HourlyScheduleWindowDuration { get; set; } + /// To specify start time of the backup window + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"To specify start time of the backup window", + SerializedName = @"scheduleWindowStartTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? HourlyScheduleWindowStartTime { get; set; } + /// Frequency of the schedule operation of this policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Frequency of the schedule operation of this policy.", + SerializedName = @"scheduleRunFrequency", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType? ScheduleRunFrequency { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"scheduleRunDays", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] WeeklyScheduleRunDay { get; set; } + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of times of day this schedule has to be run.", + SerializedName = @"scheduleRunTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] WeeklyScheduleRunTime { get; set; } + + } + /// The V2 policy schedule for IaaS that supports hourly backups. + internal partial interface ISimpleSchedulePolicyV2Internal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal + { + /// Daily schedule of this policy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailySchedule DailySchedule { get; set; } + /// List of times of day this schedule has to be run. + global::System.DateTime[] DailyScheduleRunTime { get; set; } + /// hourly schedule of this policy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IHourlySchedule HourlySchedule { get; set; } + /// + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + int? HourlyScheduleInterval { get; set; } + /// To specify duration of the backup window + int? HourlyScheduleWindowDuration { get; set; } + /// To specify start time of the backup window + global::System.DateTime? HourlyScheduleWindowStartTime { get; set; } + /// Frequency of the schedule operation of this policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType? ScheduleRunFrequency { get; set; } + /// Weekly schedule of this policy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklySchedule WeeklySchedule { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] WeeklyScheduleRunDay { get; set; } + /// List of times of day this schedule has to be run. + global::System.DateTime[] WeeklyScheduleRunTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicyV2.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicyV2.json.cs new file mode 100644 index 000000000000..5bbff9b50f10 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SimpleSchedulePolicyV2.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The V2 policy schedule for IaaS that supports hourly backups. + public partial class SimpleSchedulePolicyV2 + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyV2. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyV2. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISimpleSchedulePolicyV2 FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SimpleSchedulePolicyV2(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SimpleSchedulePolicyV2(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __schedulePolicy = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy(json); + {_hourlySchedule = If( json?.PropertyT("hourlySchedule"), out var __jsonHourlySchedule) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.HourlySchedule.FromJson(__jsonHourlySchedule) : HourlySchedule;} + {_dailySchedule = If( json?.PropertyT("dailySchedule"), out var __jsonDailySchedule) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailySchedule.FromJson(__jsonDailySchedule) : DailySchedule;} + {_weeklySchedule = If( json?.PropertyT("weeklySchedule"), out var __jsonWeeklySchedule) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklySchedule.FromJson(__jsonWeeklySchedule) : WeeklySchedule;} + {_scheduleRunFrequency = If( json?.PropertyT("scheduleRunFrequency"), out var __jsonScheduleRunFrequency) ? (string)__jsonScheduleRunFrequency : (string)ScheduleRunFrequency;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __schedulePolicy?.ToJson(container, serializationMode); + AddIf( null != this._hourlySchedule ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._hourlySchedule.ToJson(null,serializationMode) : null, "hourlySchedule" ,container.Add ); + AddIf( null != this._dailySchedule ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._dailySchedule.ToJson(null,serializationMode) : null, "dailySchedule" ,container.Add ); + AddIf( null != this._weeklySchedule ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._weeklySchedule.ToJson(null,serializationMode) : null, "weeklySchedule" ,container.Add ); + AddIf( null != (((object)this._scheduleRunFrequency)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._scheduleRunFrequency.ToString()) : null, "scheduleRunFrequency" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotBackupAdditionalDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotBackupAdditionalDetails.cs new file mode 100644 index 000000000000..20fa982ecc27 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotBackupAdditionalDetails.cs @@ -0,0 +1,139 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Snapshot Backup related fields for WorkloadType SaPHanaSystem + public partial class SnapshotBackupAdditionalDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal + { + + /// Backing field for property. + private string _instantRpDetail; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string InstantRpDetail { get => this._instantRpDetail; set => this._instantRpDetail = value; } + + /// Backing field for property. + private int? _instantRpRetentionRangeInDay; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? InstantRpRetentionRangeInDay { get => this._instantRpRetentionRangeInDay; set => this._instantRpRetentionRangeInDay = value; } + + /// Internal Acessors for UserAssignedManagedIdentityDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal.UserAssignedManagedIdentityDetail { get => (this._userAssignedManagedIdentityDetail = this._userAssignedManagedIdentityDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UserAssignedManagedIdentityDetails()); set { {_userAssignedManagedIdentityDetail = value;} } } + + /// + /// Internal Acessors for UserAssignedManagedIdentityDetailUserAssignedIdentityProperty + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal.UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityProperty = value; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails _userAssignedManagedIdentityDetail; + + /// User assigned managed identity details + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get => (this._userAssignedManagedIdentityDetail = this._userAssignedManagedIdentityDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UserAssignedManagedIdentityDetails()); set => this._userAssignedManagedIdentityDetail = value; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).IdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).IdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).IdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal)UserAssignedManagedIdentityDetail).IdentityName = value ?? null; } + + /// Creates an new instance. + public SnapshotBackupAdditionalDetails() + { + + } + } + /// Snapshot Backup related fields for WorkloadType SaPHanaSystem + public partial interface ISnapshotBackupAdditionalDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"instantRPDetails", + PossibleTypes = new [] { typeof(string) })] + string InstantRpDetail { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"instantRpRetentionRangeInDays", + PossibleTypes = new [] { typeof(int) })] + int? InstantRpRetentionRangeInDay { get; set; } + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The client ID of the assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentityPropertyClientId { get; set; } + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The principal ID of the assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentityPropertyPrincipalId { get; set; } + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ARM id of the assigned identity.", + SerializedName = @"identityArmId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedManagedIdentityDetailIdentityArmId { get; set; } + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the assigned identity.", + SerializedName = @"identityName", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedManagedIdentityDetailIdentityName { get; set; } + + } + /// Snapshot Backup related fields for WorkloadType SaPHanaSystem + internal partial interface ISnapshotBackupAdditionalDetailsInternal + + { + string InstantRpDetail { get; set; } + + int? InstantRpRetentionRangeInDay { get; set; } + /// The client ID of the assigned identity. + string UserAssignedIdentityPropertyClientId { get; set; } + /// The principal ID of the assigned identity. + string UserAssignedIdentityPropertyPrincipalId { get; set; } + /// User assigned managed identity details + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetail { get; set; } + /// The ARM id of the assigned identity. + string UserAssignedManagedIdentityDetailIdentityArmId { get; set; } + /// The name of the assigned identity. + string UserAssignedManagedIdentityDetailIdentityName { get; set; } + /// User assigned managed identity properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotBackupAdditionalDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotBackupAdditionalDetails.json.cs new file mode 100644 index 000000000000..3d31e068e327 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotBackupAdditionalDetails.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Snapshot Backup related fields for WorkloadType SaPHanaSystem + public partial class SnapshotBackupAdditionalDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SnapshotBackupAdditionalDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SnapshotBackupAdditionalDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_userAssignedManagedIdentityDetail = If( json?.PropertyT("userAssignedManagedIdentityDetails"), out var __jsonUserAssignedManagedIdentityDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UserAssignedManagedIdentityDetails.FromJson(__jsonUserAssignedManagedIdentityDetails) : UserAssignedManagedIdentityDetail;} + {_instantRpRetentionRangeInDay = If( json?.PropertyT("instantRpRetentionRangeInDays"), out var __jsonInstantRpRetentionRangeInDays) ? (int?)__jsonInstantRpRetentionRangeInDays : InstantRpRetentionRangeInDay;} + {_instantRpDetail = If( json?.PropertyT("instantRPDetails"), out var __jsonInstantRpDetails) ? (string)__jsonInstantRpDetails : (string)InstantRpDetail;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._userAssignedManagedIdentityDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._userAssignedManagedIdentityDetail.ToJson(null,serializationMode) : null, "userAssignedManagedIdentityDetails" ,container.Add ); + AddIf( null != this._instantRpRetentionRangeInDay ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._instantRpRetentionRangeInDay) : null, "instantRpRetentionRangeInDays" ,container.Add ); + AddIf( null != (((object)this._instantRpDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._instantRpDetail.ToString()) : null, "instantRPDetails" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotRestoreParameters.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotRestoreParameters.cs new file mode 100644 index 000000000000..490d64a52b8e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotRestoreParameters.cs @@ -0,0 +1,64 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Encapsulates information regarding snapshot recovery for SAP Hana + public partial class SnapshotRestoreParameters : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParametersInternal + { + + /// Backing field for property. + private string _logPointInTimeForDbRecovery; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LogPointInTimeForDbRecovery { get => this._logPointInTimeForDbRecovery; set => this._logPointInTimeForDbRecovery = value; } + + /// Backing field for property. + private bool? _skipAttachAndMount; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? SkipAttachAndMount { get => this._skipAttachAndMount; set => this._skipAttachAndMount = value; } + + /// Creates an new instance. + public SnapshotRestoreParameters() + { + + } + } + /// Encapsulates information regarding snapshot recovery for SAP Hana + public partial interface ISnapshotRestoreParameters : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"logPointInTimeForDBRecovery", + PossibleTypes = new [] { typeof(string) })] + string LogPointInTimeForDbRecovery { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"skipAttachAndMount", + PossibleTypes = new [] { typeof(bool) })] + bool? SkipAttachAndMount { get; set; } + + } + /// Encapsulates information regarding snapshot recovery for SAP Hana + internal partial interface ISnapshotRestoreParametersInternal + + { + string LogPointInTimeForDbRecovery { get; set; } + + bool? SkipAttachAndMount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotRestoreParameters.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotRestoreParameters.json.cs new file mode 100644 index 000000000000..bba742dcd7af --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SnapshotRestoreParameters.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Encapsulates information regarding snapshot recovery for SAP Hana + public partial class SnapshotRestoreParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotRestoreParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SnapshotRestoreParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SnapshotRestoreParameters(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_skipAttachAndMount = If( json?.PropertyT("skipAttachAndMount"), out var __jsonSkipAttachAndMount) ? (bool?)__jsonSkipAttachAndMount : SkipAttachAndMount;} + {_logPointInTimeForDbRecovery = If( json?.PropertyT("logPointInTimeForDBRecovery"), out var __jsonLogPointInTimeForDbRecovery) ? (string)__jsonLogPointInTimeForDbRecovery : (string)LogPointInTimeForDbRecovery;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._skipAttachAndMount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._skipAttachAndMount) : null, "skipAttachAndMount" ,container.Add ); + AddIf( null != (((object)this._logPointInTimeForDbRecovery)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._logPointInTimeForDbRecovery.ToString()) : null, "logPointInTimeForDBRecovery" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectory.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectory.cs new file mode 100644 index 000000000000..d01ed2f5571a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectory.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// SQLDataDirectory info + public partial class SqlDataDirectory : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryInternal + { + + /// Backing field for property. + private string _logicalName; + + /// Logical name of the file + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string LogicalName { get => this._logicalName; set => this._logicalName = value; } + + /// Backing field for property. + private string _path; + + /// File path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Path { get => this._path; set => this._path = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType? _type; + + /// Type of data directory mapping + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType? Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public SqlDataDirectory() + { + + } + } + /// SQLDataDirectory info + public partial interface ISqlDataDirectory : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Logical name of the file + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Logical name of the file", + SerializedName = @"logicalName", + PossibleTypes = new [] { typeof(string) })] + string LogicalName { get; set; } + /// File path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"File path", + SerializedName = @"path", + PossibleTypes = new [] { typeof(string) })] + string Path { get; set; } + /// Type of data directory mapping + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of data directory mapping", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType? Type { get; set; } + + } + /// SQLDataDirectory info + internal partial interface ISqlDataDirectoryInternal + + { + /// Logical name of the file + string LogicalName { get; set; } + /// File path + string Path { get; set; } + /// Type of data directory mapping + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType? Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectory.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectory.json.cs new file mode 100644 index 000000000000..1564d6178fa6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectory.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// SQLDataDirectory info + public partial class SqlDataDirectory + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectory FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SqlDataDirectory(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SqlDataDirectory(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)Path;} + {_logicalName = If( json?.PropertyT("logicalName"), out var __jsonLogicalName) ? (string)__jsonLogicalName : (string)LogicalName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + 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 ); + AddIf( null != (((object)this._path)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._path.ToString()) : null, "path" ,container.Add ); + AddIf( null != (((object)this._logicalName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._logicalName.ToString()) : null, "logicalName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectoryMapping.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectoryMapping.cs new file mode 100644 index 000000000000..ee2c88c2624c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectoryMapping.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Encapsulates information regarding data directory + public partial class SqlDataDirectoryMapping : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMappingInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType? _mappingType; + + /// Type of data directory mapping + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType? MappingType { get => this._mappingType; set => this._mappingType = value; } + + /// Backing field for property. + private string _sourceLogicalName; + + /// Restore source logical name path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceLogicalName { get => this._sourceLogicalName; set => this._sourceLogicalName = value; } + + /// Backing field for property. + private string _sourcePath; + + /// Restore source path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourcePath { get => this._sourcePath; set => this._sourcePath = value; } + + /// Backing field for property. + private string _targetPath; + + /// Target path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetPath { get => this._targetPath; set => this._targetPath = value; } + + /// Creates an new instance. + public SqlDataDirectoryMapping() + { + + } + } + /// Encapsulates information regarding data directory + public partial interface ISqlDataDirectoryMapping : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Type of data directory mapping + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of data directory mapping", + SerializedName = @"mappingType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType? MappingType { get; set; } + /// Restore source logical name path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Restore source logical name path", + SerializedName = @"sourceLogicalName", + PossibleTypes = new [] { typeof(string) })] + string SourceLogicalName { get; set; } + /// Restore source path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Restore source path", + SerializedName = @"sourcePath", + PossibleTypes = new [] { typeof(string) })] + string SourcePath { get; set; } + /// Target path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Target path", + SerializedName = @"targetPath", + PossibleTypes = new [] { typeof(string) })] + string TargetPath { get; set; } + + } + /// Encapsulates information regarding data directory + internal partial interface ISqlDataDirectoryMappingInternal + + { + /// Type of data directory mapping + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType? MappingType { get; set; } + /// Restore source logical name path + string SourceLogicalName { get; set; } + /// Restore source path + string SourcePath { get; set; } + /// Target path + string TargetPath { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectoryMapping.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectoryMapping.json.cs new file mode 100644 index 000000000000..310a9c065512 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SqlDataDirectoryMapping.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Encapsulates information regarding data directory + public partial class SqlDataDirectoryMapping + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISqlDataDirectoryMapping FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SqlDataDirectoryMapping(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SqlDataDirectoryMapping(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_mappingType = If( json?.PropertyT("mappingType"), out var __jsonMappingType) ? (string)__jsonMappingType : (string)MappingType;} + {_sourceLogicalName = If( json?.PropertyT("sourceLogicalName"), out var __jsonSourceLogicalName) ? (string)__jsonSourceLogicalName : (string)SourceLogicalName;} + {_sourcePath = If( json?.PropertyT("sourcePath"), out var __jsonSourcePath) ? (string)__jsonSourcePath : (string)SourcePath;} + {_targetPath = If( json?.PropertyT("targetPath"), out var __jsonTargetPath) ? (string)__jsonTargetPath : (string)TargetPath;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._mappingType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._mappingType.ToString()) : null, "mappingType" ,container.Add ); + AddIf( null != (((object)this._sourceLogicalName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceLogicalName.ToString()) : null, "sourceLogicalName" ,container.Add ); + AddIf( null != (((object)this._sourcePath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourcePath.ToString()) : null, "sourcePath" ,container.Add ); + AddIf( null != (((object)this._targetPath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetPath.ToString()) : null, "targetPath" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicy.cs new file mode 100644 index 000000000000..bb6c885b13bd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicy.cs @@ -0,0 +1,254 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Sub-protection policy which includes schedule and retention + public partial class SubProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyInternal + { + + /// Internal Acessors for RetentionPolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyInternal.RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set { {_retentionPolicy = value;} } } + + /// Internal Acessors for SchedulePolicy + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyInternal.SchedulePolicy { get => (this._schedulePolicy = this._schedulePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy()); set { {_schedulePolicy = value;} } } + + /// Internal Acessors for SnapshotBackupAdditionalDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyInternal.SnapshotBackupAdditionalDetail { get => (this._snapshotBackupAdditionalDetail = this._snapshotBackupAdditionalDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SnapshotBackupAdditionalDetails()); set { {_snapshotBackupAdditionalDetail = value;} } } + + /// + /// Internal Acessors for SnapshotBackupAdditionalDetailUserAssignedManagedIdentityDetail + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyInternal.SnapshotBackupAdditionalDetailUserAssignedManagedIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedManagedIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedManagedIdentityDetail = value; } + + /// + /// Internal Acessors for UserAssignedManagedIdentityDetailUserAssignedIdentityProperty + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyInternal.UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedManagedIdentityDetailUserAssignedIdentityProperty = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType? _policyType; + + /// Type of backup policy type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType? PolicyType { get => this._policyType; set => this._policyType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy _retentionPolicy; + + /// Retention policy with the details on backup copy retention ranges. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get => (this._retentionPolicy = this._retentionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set => this._retentionPolicy = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RetentionPolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)RetentionPolicy).Type = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy _schedulePolicy; + + /// Backup schedule specified as part of backup policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy SchedulePolicy { get => (this._schedulePolicy = this._schedulePolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy()); set => this._schedulePolicy = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SchedulePolicyType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)SchedulePolicy).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicyInternal)SchedulePolicy).Type = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetails _snapshotBackupAdditionalDetail; + + /// Snapshot Backup related fields for WorkloadType SaPHanaSystem + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetails SnapshotBackupAdditionalDetail { get => (this._snapshotBackupAdditionalDetail = this._snapshotBackupAdditionalDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SnapshotBackupAdditionalDetails()); set => this._snapshotBackupAdditionalDetail = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string SnapshotBackupAdditionalDetailInstantRpDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).InstantRpDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).InstantRpDetail = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? SnapshotBackupAdditionalDetailInstantRpRetentionRangeInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).InstantRpRetentionRangeInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).InstantRpRetentionRangeInDay = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicy _tieringPolicy; + + /// + /// Tiering policy to automatically move RPs to another tier. + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicy TieringPolicy { get => (this._tieringPolicy = this._tieringPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SubProtectionPolicyTieringPolicy()); set => this._tieringPolicy = value; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedIdentityPropertyClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedIdentityPropertyClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedIdentityPropertyPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedIdentityPropertyPrincipalId = value ?? null; } + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedManagedIdentityDetailIdentityArmId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedManagedIdentityDetailIdentityArmId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedManagedIdentityDetailIdentityArmId = value ?? null; } + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedManagedIdentityDetailIdentityName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedManagedIdentityDetailIdentityName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetailsInternal)SnapshotBackupAdditionalDetail).UserAssignedManagedIdentityDetailIdentityName = value ?? null; } + + /// Creates an new instance. + public SubProtectionPolicy() + { + + } + } + /// Sub-protection policy which includes schedule and retention + public partial interface ISubProtectionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Type of backup policy type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup policy type", + SerializedName = @"policyType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType? PolicyType { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"retentionPolicyType", + PossibleTypes = new [] { typeof(string) })] + string RetentionPolicyType { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"schedulePolicyType", + PossibleTypes = new [] { typeof(string) })] + string SchedulePolicyType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"instantRPDetails", + PossibleTypes = new [] { typeof(string) })] + string SnapshotBackupAdditionalDetailInstantRpDetail { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"instantRpRetentionRangeInDays", + PossibleTypes = new [] { typeof(int) })] + int? SnapshotBackupAdditionalDetailInstantRpRetentionRangeInDay { get; set; } + /// + /// Tiering policy to automatically move RPs to another tier. + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tiering policy to automatically move RPs to another tier. + Key is Target Tier, defined in RecoveryPointTierType enum. + Tiering policy specifies the criteria to move RP to the target tier.", + SerializedName = @"tieringPolicy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicy TieringPolicy { get; set; } + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The client ID of the assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentityPropertyClientId { get; set; } + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The principal ID of the assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentityPropertyPrincipalId { get; set; } + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ARM id of the assigned identity.", + SerializedName = @"identityArmId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedManagedIdentityDetailIdentityArmId { get; set; } + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the assigned identity.", + SerializedName = @"identityName", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedManagedIdentityDetailIdentityName { get; set; } + + } + /// Sub-protection policy which includes schedule and retention + internal partial interface ISubProtectionPolicyInternal + + { + /// Type of backup policy type + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType? PolicyType { get; set; } + /// Retention policy with the details on backup copy retention ranges. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy RetentionPolicy { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string RetentionPolicyType { get; set; } + /// Backup schedule specified as part of backup policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISchedulePolicy SchedulePolicy { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string SchedulePolicyType { get; set; } + /// Snapshot Backup related fields for WorkloadType SaPHanaSystem + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISnapshotBackupAdditionalDetails SnapshotBackupAdditionalDetail { get; set; } + + string SnapshotBackupAdditionalDetailInstantRpDetail { get; set; } + + int? SnapshotBackupAdditionalDetailInstantRpRetentionRangeInDay { get; set; } + /// User assigned managed identity details + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails SnapshotBackupAdditionalDetailUserAssignedManagedIdentityDetail { get; set; } + /// + /// Tiering policy to automatically move RPs to another tier. + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicy TieringPolicy { get; set; } + /// The client ID of the assigned identity. + string UserAssignedIdentityPropertyClientId { get; set; } + /// The principal ID of the assigned identity. + string UserAssignedIdentityPropertyPrincipalId { get; set; } + /// The ARM id of the assigned identity. + string UserAssignedManagedIdentityDetailIdentityArmId { get; set; } + /// The name of the assigned identity. + string UserAssignedManagedIdentityDetailIdentityName { get; set; } + /// User assigned managed identity properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedManagedIdentityDetailUserAssignedIdentityProperty { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicy.json.cs new file mode 100644 index 000000000000..a691e60dfa38 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicy.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Sub-protection policy which includes schedule and retention + public partial class SubProtectionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SubProtectionPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal SubProtectionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_schedulePolicy = If( json?.PropertyT("schedulePolicy"), out var __jsonSchedulePolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SchedulePolicy.FromJson(__jsonSchedulePolicy) : SchedulePolicy;} + {_retentionPolicy = If( json?.PropertyT("retentionPolicy"), out var __jsonRetentionPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy.FromJson(__jsonRetentionPolicy) : RetentionPolicy;} + {_snapshotBackupAdditionalDetail = If( json?.PropertyT("snapshotBackupAdditionalDetails"), out var __jsonSnapshotBackupAdditionalDetails) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SnapshotBackupAdditionalDetails.FromJson(__jsonSnapshotBackupAdditionalDetails) : SnapshotBackupAdditionalDetail;} + {_policyType = If( json?.PropertyT("policyType"), out var __jsonPolicyType) ? (string)__jsonPolicyType : (string)PolicyType;} + {_tieringPolicy = If( json?.PropertyT("tieringPolicy"), out var __jsonTieringPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SubProtectionPolicyTieringPolicy.FromJson(__jsonTieringPolicy) : TieringPolicy;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._schedulePolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._schedulePolicy.ToJson(null,serializationMode) : null, "schedulePolicy" ,container.Add ); + AddIf( null != this._retentionPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionPolicy.ToJson(null,serializationMode) : null, "retentionPolicy" ,container.Add ); + AddIf( null != this._snapshotBackupAdditionalDetail ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._snapshotBackupAdditionalDetail.ToJson(null,serializationMode) : null, "snapshotBackupAdditionalDetails" ,container.Add ); + AddIf( null != (((object)this._policyType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyType.ToString()) : null, "policyType" ,container.Add ); + AddIf( null != this._tieringPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._tieringPolicy.ToJson(null,serializationMode) : null, "tieringPolicy" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicyTieringPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicyTieringPolicy.cs new file mode 100644 index 000000000000..ff4866f54c13 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicyTieringPolicy.cs @@ -0,0 +1,43 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Tiering policy to automatically move RPs to another tier. + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + public partial class SubProtectionPolicyTieringPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicyInternal + { + + /// Creates an new instance. + public SubProtectionPolicyTieringPolicy() + { + + } + } + /// Tiering policy to automatically move RPs to another tier. + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + public partial interface ISubProtectionPolicyTieringPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Tiering policy to automatically move RPs to another tier. + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + internal partial interface ISubProtectionPolicyTieringPolicyInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicyTieringPolicy.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicyTieringPolicy.dictionary.cs new file mode 100644 index 000000000000..ea6034a651ba --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicyTieringPolicy.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class SubProtectionPolicyTieringPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.SubProtectionPolicyTieringPolicy source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicyTieringPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicyTieringPolicy.json.cs new file mode 100644 index 000000000000..26f327f857d4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/SubProtectionPolicyTieringPolicy.json.cs @@ -0,0 +1,113 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Tiering policy to automatically move RPs to another tier. + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + public partial class SubProtectionPolicyTieringPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISubProtectionPolicyTieringPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new SubProtectionPolicyTieringPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal SubProtectionPolicyTieringPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TieringPolicy.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetAfsRestoreInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetAfsRestoreInfo.cs new file mode 100644 index 000000000000..3bfe30c8ed3d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetAfsRestoreInfo.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Target Azure File Share Info. + public partial class TargetAfsRestoreInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfoInternal + { + + /// Backing field for property. + private string _name; + + /// File share name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _targetResourceId; + + /// Target file share resource ARM ID + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetResourceId { get => this._targetResourceId; set => this._targetResourceId = value; } + + /// Creates an new instance. + public TargetAfsRestoreInfo() + { + + } + } + /// Target Azure File Share Info. + public partial interface ITargetAfsRestoreInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// File share name + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"File share name", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Target file share resource ARM ID + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Target file share resource ARM ID", + SerializedName = @"targetResourceId", + PossibleTypes = new [] { typeof(string) })] + string TargetResourceId { get; set; } + + } + /// Target Azure File Share Info. + internal partial interface ITargetAfsRestoreInfoInternal + + { + /// File share name + string Name { get; set; } + /// Target file share resource ARM ID + string TargetResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetAfsRestoreInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetAfsRestoreInfo.json.cs new file mode 100644 index 000000000000..903d6cbe4b6a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetAfsRestoreInfo.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Target Azure File Share Info. + public partial class TargetAfsRestoreInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetAfsRestoreInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new TargetAfsRestoreInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal TargetAfsRestoreInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_targetResourceId = If( json?.PropertyT("targetResourceId"), out var __jsonTargetResourceId) ? (string)__jsonTargetResourceId : (string)TargetResourceId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._targetResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetResourceId.ToString()) : null, "targetResourceId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetDiskNetworkAccessSettings.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetDiskNetworkAccessSettings.cs new file mode 100644 index 000000000000..600c6558a1ac --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetDiskNetworkAccessSettings.cs @@ -0,0 +1,74 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Specifies target network access settings for disks of VM to be restored. + public partial class TargetDiskNetworkAccessSettings : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettings, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettingsInternal + { + + /// Backing field for property. + private string _targetDiskAccessId; + + /// + /// Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetDiskAccessId { get => this._targetDiskAccessId; set => this._targetDiskAccessId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption? _targetDiskNetworkAccessOption; + + /// Network access settings to be used for restored disks + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption? TargetDiskNetworkAccessOption { get => this._targetDiskNetworkAccessOption; set => this._targetDiskNetworkAccessOption = value; } + + /// Creates an new instance. + public TargetDiskNetworkAccessSettings() + { + + } + } + /// Specifies target network access settings for disks of VM to be restored. + public partial interface ITargetDiskNetworkAccessSettings : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew", + SerializedName = @"targetDiskAccessId", + PossibleTypes = new [] { typeof(string) })] + string TargetDiskAccessId { get; set; } + /// Network access settings to be used for restored disks + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Network access settings to be used for restored disks", + SerializedName = @"targetDiskNetworkAccessOption", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption? TargetDiskNetworkAccessOption { get; set; } + + } + /// Specifies target network access settings for disks of VM to be restored. + internal partial interface ITargetDiskNetworkAccessSettingsInternal + + { + /// + /// Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew + /// + string TargetDiskAccessId { get; set; } + /// Network access settings to be used for restored disks + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption? TargetDiskNetworkAccessOption { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetDiskNetworkAccessSettings.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetDiskNetworkAccessSettings.json.cs new file mode 100644 index 000000000000..9538a0af70b0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetDiskNetworkAccessSettings.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Specifies target network access settings for disks of VM to be restored. + public partial class TargetDiskNetworkAccessSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetDiskNetworkAccessSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new TargetDiskNetworkAccessSettings(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal TargetDiskNetworkAccessSettings(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_targetDiskNetworkAccessOption = If( json?.PropertyT("targetDiskNetworkAccessOption"), out var __jsonTargetDiskNetworkAccessOption) ? (string)__jsonTargetDiskNetworkAccessOption : (string)TargetDiskNetworkAccessOption;} + {_targetDiskAccessId = If( json?.PropertyT("targetDiskAccessId"), out var __jsonTargetDiskAccessId) ? (string)__jsonTargetDiskAccessId : (string)TargetDiskAccessId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._targetDiskNetworkAccessOption)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetDiskNetworkAccessOption.ToString()) : null, "targetDiskNetworkAccessOption" ,container.Add ); + AddIf( null != (((object)this._targetDiskAccessId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetDiskAccessId.ToString()) : null, "targetDiskAccessId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetRestoreInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetRestoreInfo.cs new file mode 100644 index 000000000000..456680a5a5a3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetRestoreInfo.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Details about target workload during restore operation. + public partial class TargetRestoreInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfoInternal + { + + /// Backing field for property. + private string _containerId; + + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerId { get => this._containerId; set => this._containerId = value; } + + /// Backing field for property. + private string _databaseName; + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string DatabaseName { get => this._databaseName; set => this._databaseName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? _overwriteOption; + + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? OverwriteOption { get => this._overwriteOption; set => this._overwriteOption = value; } + + /// Backing field for property. + private string _targetDirectoryForFileRestore; + + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string TargetDirectoryForFileRestore { get => this._targetDirectoryForFileRestore; set => this._targetDirectoryForFileRestore = value; } + + /// Creates an new instance. + public TargetRestoreInfo() + { + + } + } + /// Details about target workload during restore operation. + public partial interface ITargetRestoreInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Resource Id name of the container in which Target DataBase resides + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource Id name of the container in which Target DataBase resides", + SerializedName = @"containerId", + PossibleTypes = new [] { typeof(string) })] + string ContainerId { get; set; } + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana", + SerializedName = @"databaseName", + PossibleTypes = new [] { typeof(string) })] + string DatabaseName { get; set; } + /// Can Overwrite if Target DataBase already exists + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Can Overwrite if Target DataBase already exists", + SerializedName = @"overwriteOption", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? OverwriteOption { get; set; } + /// Target directory location for restore as files. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Target directory location for restore as files.", + SerializedName = @"targetDirectoryForFileRestore", + PossibleTypes = new [] { typeof(string) })] + string TargetDirectoryForFileRestore { get; set; } + + } + /// Details about target workload during restore operation. + internal partial interface ITargetRestoreInfoInternal + + { + /// Resource Id name of the container in which Target DataBase resides + string ContainerId { get; set; } + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + string DatabaseName { get; set; } + /// Can Overwrite if Target DataBase already exists + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions? OverwriteOption { get; set; } + /// Target directory location for restore as files. + string TargetDirectoryForFileRestore { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetRestoreInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetRestoreInfo.json.cs new file mode 100644 index 000000000000..9dbfbd0287b7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TargetRestoreInfo.json.cs @@ -0,0 +1,114 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Details about target workload during restore operation. + public partial class TargetRestoreInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITargetRestoreInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new TargetRestoreInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal TargetRestoreInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_overwriteOption = If( json?.PropertyT("overwriteOption"), out var __jsonOverwriteOption) ? (string)__jsonOverwriteOption : (string)OverwriteOption;} + {_containerId = If( json?.PropertyT("containerId"), out var __jsonContainerId) ? (string)__jsonContainerId : (string)ContainerId;} + {_databaseName = If( json?.PropertyT("databaseName"), out var __jsonDatabaseName) ? (string)__jsonDatabaseName : (string)DatabaseName;} + {_targetDirectoryForFileRestore = If( json?.PropertyT("targetDirectoryForFileRestore"), out var __jsonTargetDirectoryForFileRestore) ? (string)__jsonTargetDirectoryForFileRestore : (string)TargetDirectoryForFileRestore;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._overwriteOption)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._overwriteOption.ToString()) : null, "overwriteOption" ,container.Add ); + AddIf( null != (((object)this._containerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerId.ToString()) : null, "containerId" ,container.Add ); + AddIf( null != (((object)this._databaseName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._databaseName.ToString()) : null, "databaseName" ,container.Add ); + AddIf( null != (((object)this._targetDirectoryForFileRestore)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._targetDirectoryForFileRestore.ToString()) : null, "targetDirectoryForFileRestore" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostInfo.cs new file mode 100644 index 000000000000..16393bcaf7c8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostInfo.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for tiering cost response + public partial class TieringCostInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfoInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Creates an new instance. + public TieringCostInfo() + { + + } + } + /// Base class for tiering cost response + public partial interface ITieringCostInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Base class for tiering cost response + internal partial interface ITieringCostInfoInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostInfo.json.cs new file mode 100644 index 000000000000..b1de2a6a90e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostInfo.json.cs @@ -0,0 +1,127 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for tiering cost response + public partial class TieringCostInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfo. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfo interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "TieringCostRehydrationInfo": + { + return new TieringCostRehydrationInfo(json); + } + case "TieringCostSavingInfo": + { + return new TieringCostSavingInfo(json); + } + } + return new TieringCostInfo(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal TieringCostInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostRehydrationInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostRehydrationInfo.cs new file mode 100644 index 000000000000..4a34b262a7b7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostRehydrationInfo.cs @@ -0,0 +1,93 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response parameters for tiering cost info for rehydration + public partial class TieringCostRehydrationInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostRehydrationInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostRehydrationInfoInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfo __tieringCostInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TieringCostInfo(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfoInternal)__tieringCostInfo).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfoInternal)__tieringCostInfo).ObjectType = value ; } + + /// Backing field for property. + private long _rehydrationSizeInByte; + + /// Rehydration size in bytes + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long RehydrationSizeInByte { get => this._rehydrationSizeInByte; set => this._rehydrationSizeInByte = value; } + + /// Backing field for property. + private double _retailRehydrationCostPerGbPerMonth; + + /// Source tier to target tier rehydration cost per GB per month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public double RetailRehydrationCostPerGbPerMonth { get => this._retailRehydrationCostPerGbPerMonth; set => this._retailRehydrationCostPerGbPerMonth = value; } + + /// Creates an new instance. + public TieringCostRehydrationInfo() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__tieringCostInfo), __tieringCostInfo); + await eventListener.AssertObjectIsValid(nameof(__tieringCostInfo), __tieringCostInfo); + } + } + /// Response parameters for tiering cost info for rehydration + public partial interface ITieringCostRehydrationInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfo + { + /// Rehydration size in bytes + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Rehydration size in bytes", + SerializedName = @"rehydrationSizeInBytes", + PossibleTypes = new [] { typeof(long) })] + long RehydrationSizeInByte { get; set; } + /// Source tier to target tier rehydration cost per GB per month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Source tier to target tier rehydration cost per GB per month", + SerializedName = @"retailRehydrationCostPerGBPerMonth", + PossibleTypes = new [] { typeof(double) })] + double RetailRehydrationCostPerGbPerMonth { get; set; } + + } + /// Response parameters for tiering cost info for rehydration + internal partial interface ITieringCostRehydrationInfoInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfoInternal + { + /// Rehydration size in bytes + long RehydrationSizeInByte { get; set; } + /// Source tier to target tier rehydration cost per GB per month + double RetailRehydrationCostPerGbPerMonth { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostRehydrationInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostRehydrationInfo.json.cs new file mode 100644 index 000000000000..d11859f08e89 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostRehydrationInfo.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response parameters for tiering cost info for rehydration + public partial class TieringCostRehydrationInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostRehydrationInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostRehydrationInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostRehydrationInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new TieringCostRehydrationInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal TieringCostRehydrationInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __tieringCostInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TieringCostInfo(json); + {_rehydrationSizeInByte = If( json?.PropertyT("rehydrationSizeInBytes"), out var __jsonRehydrationSizeInBytes) ? (long)__jsonRehydrationSizeInBytes : RehydrationSizeInByte;} + {_retailRehydrationCostPerGbPerMonth = If( json?.PropertyT("retailRehydrationCostPerGBPerMonth"), out var __jsonRetailRehydrationCostPerGbPerMonth) ? (double)__jsonRetailRehydrationCostPerGbPerMonth : RetailRehydrationCostPerGbPerMonth;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __tieringCostInfo?.ToJson(container, serializationMode); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber(this._rehydrationSizeInByte), "rehydrationSizeInBytes" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber(this._retailRehydrationCostPerGbPerMonth), "retailRehydrationCostPerGBPerMonth" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostSavingInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostSavingInfo.cs new file mode 100644 index 000000000000..693617475b1e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostSavingInfo.cs @@ -0,0 +1,139 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response parameters for tiering cost info for savings + public partial class TieringCostSavingInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostSavingInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostSavingInfoInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfo __tieringCostInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TieringCostInfo(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfoInternal)__tieringCostInfo).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfoInternal)__tieringCostInfo).ObjectType = value ; } + + /// Backing field for property. + private double _retailSourceTierCostPerGbPerMonth; + + /// Source tier retail cost per GB per month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public double RetailSourceTierCostPerGbPerMonth { get => this._retailSourceTierCostPerGbPerMonth; set => this._retailSourceTierCostPerGbPerMonth = value; } + + /// Backing field for property. + private double _retailTargetTierCostPerGbPerMonth; + + /// Target tier retail cost per GB per month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public double RetailTargetTierCostPerGbPerMonth { get => this._retailTargetTierCostPerGbPerMonth; set => this._retailTargetTierCostPerGbPerMonth = value; } + + /// Backing field for property. + private long _sourceTierSizeReductionInByte; + + /// + /// Source tier size reduction in bytes after moving all the recommended backup points to target tier + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long SourceTierSizeReductionInByte { get => this._sourceTierSizeReductionInByte; set => this._sourceTierSizeReductionInByte = value; } + + /// Backing field for property. + private long _targetTierSizeIncreaseInByte; + + /// + /// Target tier size increase in bytes after moving all the recommended backup points to target tier + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long TargetTierSizeIncreaseInByte { get => this._targetTierSizeIncreaseInByte; set => this._targetTierSizeIncreaseInByte = value; } + + /// Creates an new instance. + public TieringCostSavingInfo() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__tieringCostInfo), __tieringCostInfo); + await eventListener.AssertObjectIsValid(nameof(__tieringCostInfo), __tieringCostInfo); + } + } + /// Response parameters for tiering cost info for savings + public partial interface ITieringCostSavingInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfo + { + /// Source tier retail cost per GB per month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Source tier retail cost per GB per month", + SerializedName = @"retailSourceTierCostPerGBPerMonth", + PossibleTypes = new [] { typeof(double) })] + double RetailSourceTierCostPerGbPerMonth { get; set; } + /// Target tier retail cost per GB per month + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Target tier retail cost per GB per month", + SerializedName = @"retailTargetTierCostPerGBPerMonth", + PossibleTypes = new [] { typeof(double) })] + double RetailTargetTierCostPerGbPerMonth { get; set; } + /// + /// Source tier size reduction in bytes after moving all the recommended backup points to target tier + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Source tier size reduction in bytes after moving all the recommended backup points to target tier", + SerializedName = @"sourceTierSizeReductionInBytes", + PossibleTypes = new [] { typeof(long) })] + long SourceTierSizeReductionInByte { get; set; } + /// + /// Target tier size increase in bytes after moving all the recommended backup points to target tier + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Target tier size increase in bytes after moving all the recommended backup points to target tier", + SerializedName = @"targetTierSizeIncreaseInBytes", + PossibleTypes = new [] { typeof(long) })] + long TargetTierSizeIncreaseInByte { get; set; } + + } + /// Response parameters for tiering cost info for savings + internal partial interface ITieringCostSavingInfoInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostInfoInternal + { + /// Source tier retail cost per GB per month + double RetailSourceTierCostPerGbPerMonth { get; set; } + /// Target tier retail cost per GB per month + double RetailTargetTierCostPerGbPerMonth { get; set; } + /// + /// Source tier size reduction in bytes after moving all the recommended backup points to target tier + /// + long SourceTierSizeReductionInByte { get; set; } + /// + /// Target tier size increase in bytes after moving all the recommended backup points to target tier + /// + long TargetTierSizeIncreaseInByte { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostSavingInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostSavingInfo.json.cs new file mode 100644 index 000000000000..bce1d00996a3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringCostSavingInfo.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response parameters for tiering cost info for savings + public partial class TieringCostSavingInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostSavingInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostSavingInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringCostSavingInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new TieringCostSavingInfo(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal TieringCostSavingInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __tieringCostInfo = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TieringCostInfo(json); + {_sourceTierSizeReductionInByte = If( json?.PropertyT("sourceTierSizeReductionInBytes"), out var __jsonSourceTierSizeReductionInBytes) ? (long)__jsonSourceTierSizeReductionInBytes : SourceTierSizeReductionInByte;} + {_targetTierSizeIncreaseInByte = If( json?.PropertyT("targetTierSizeIncreaseInBytes"), out var __jsonTargetTierSizeIncreaseInBytes) ? (long)__jsonTargetTierSizeIncreaseInBytes : TargetTierSizeIncreaseInByte;} + {_retailSourceTierCostPerGbPerMonth = If( json?.PropertyT("retailSourceTierCostPerGBPerMonth"), out var __jsonRetailSourceTierCostPerGbPerMonth) ? (double)__jsonRetailSourceTierCostPerGbPerMonth : RetailSourceTierCostPerGbPerMonth;} + {_retailTargetTierCostPerGbPerMonth = If( json?.PropertyT("retailTargetTierCostPerGBPerMonth"), out var __jsonRetailTargetTierCostPerGbPerMonth) ? (double)__jsonRetailTargetTierCostPerGbPerMonth : RetailTargetTierCostPerGbPerMonth;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __tieringCostInfo?.ToJson(container, serializationMode); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber(this._sourceTierSizeReductionInByte), "sourceTierSizeReductionInBytes" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber(this._targetTierSizeIncreaseInByte), "targetTierSizeIncreaseInBytes" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber(this._retailSourceTierCostPerGbPerMonth), "retailSourceTierCostPerGBPerMonth" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber(this._retailTargetTierCostPerGbPerMonth), "retailTargetTierCostPerGBPerMonth" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringPolicy.cs new file mode 100644 index 000000000000..0a5a0fcfd54c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringPolicy.cs @@ -0,0 +1,131 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Tiering Policy for a target tier. + /// If the policy is not specified for a given target tier, service retains the existing configured tiering policy for that + /// tier + /// + public partial class TieringPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicyInternal + { + + /// Backing field for property. + private int? _duration; + + /// + /// Number of days/weeks/months/years to retain backups in current tier before tiering. + /// Used only if TieringMode is set to TierAfter + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? Duration { get => this._duration; set => this._duration = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? _durationType; + + /// + /// Retention duration type: days/weeks/months/years + /// Used only if TieringMode is set to TierAfter + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? DurationType { get => this._durationType; set => this._durationType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode? _tieringMode; + + /// + /// Tiering Mode to control automatic tiering of recovery points. Supported values are: + /// 1. TierRecommended: Tier all recovery points recommended to be tiered + /// 2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below. + /// 3. DoNotTier: Do not tier any recovery points + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode? TieringMode { get => this._tieringMode; set => this._tieringMode = value; } + + /// Creates an new instance. + public TieringPolicy() + { + + } + } + /// Tiering Policy for a target tier. + /// If the policy is not specified for a given target tier, service retains the existing configured tiering policy for that + /// tier + public partial interface ITieringPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// Number of days/weeks/months/years to retain backups in current tier before tiering. + /// Used only if TieringMode is set to TierAfter + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of days/weeks/months/years to retain backups in current tier before tiering. + Used only if TieringMode is set to TierAfter", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(int) })] + int? Duration { get; set; } + /// + /// Retention duration type: days/weeks/months/years + /// Used only if TieringMode is set to TierAfter + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type: days/weeks/months/years + Used only if TieringMode is set to TierAfter", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? DurationType { get; set; } + /// + /// Tiering Mode to control automatic tiering of recovery points. Supported values are: + /// 1. TierRecommended: Tier all recovery points recommended to be tiered + /// 2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below. + /// 3. DoNotTier: Do not tier any recovery points + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tiering Mode to control automatic tiering of recovery points. Supported values are: + 1. TierRecommended: Tier all recovery points recommended to be tiered + 2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below. + 3. DoNotTier: Do not tier any recovery points", + SerializedName = @"tieringMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode? TieringMode { get; set; } + + } + /// Tiering Policy for a target tier. + /// If the policy is not specified for a given target tier, service retains the existing configured tiering policy for that + /// tier + internal partial interface ITieringPolicyInternal + + { + /// + /// Number of days/weeks/months/years to retain backups in current tier before tiering. + /// Used only if TieringMode is set to TierAfter + /// + int? Duration { get; set; } + /// + /// Retention duration type: days/weeks/months/years + /// Used only if TieringMode is set to TierAfter + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? DurationType { get; set; } + /// + /// Tiering Mode to control automatic tiering of recovery points. Supported values are: + /// 1. TierRecommended: Tier all recovery points recommended to be tiered + /// 2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below. + /// 3. DoNotTier: Do not tier any recovery points + /// + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode? TieringMode { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringPolicy.json.cs new file mode 100644 index 000000000000..03ad40f9bca6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TieringPolicy.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Tiering Policy for a target tier. + /// If the policy is not specified for a given target tier, service retains the existing configured tiering policy for that + /// tier + /// + public partial class TieringPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITieringPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new TieringPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal TieringPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_tieringMode = If( json?.PropertyT("tieringMode"), out var __jsonTieringMode) ? (string)__jsonTieringMode : (string)TieringMode;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? (int?)__jsonDuration : Duration;} + {_durationType = If( json?.PropertyT("durationType"), out var __jsonDurationType) ? (string)__jsonDurationType : (string)DurationType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._tieringMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._tieringMode.ToString()) : null, "tieringMode" ,container.Add ); + AddIf( null != this._duration ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._duration) : null, "duration" ,container.Add ); + AddIf( null != (((object)this._durationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._durationType.ToString()) : null, "durationType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TokenInformation.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TokenInformation.cs new file mode 100644 index 000000000000..f7e0b763f77a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TokenInformation.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The token information details. + public partial class TokenInformation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITokenInformation, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITokenInformationInternal + { + + /// Backing field for property. + private long? _expiryTimeInUtcTick; + + /// Expiry time of token. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? ExpiryTimeInUtcTick { get => this._expiryTimeInUtcTick; set => this._expiryTimeInUtcTick = value; } + + /// Backing field for property. + private string _securityPin; + + /// Security PIN + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SecurityPin { get => this._securityPin; set => this._securityPin = value; } + + /// Backing field for property. + private string _token; + + /// Token value. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Token { get => this._token; set => this._token = value; } + + /// Creates an new instance. + public TokenInformation() + { + + } + } + /// The token information details. + public partial interface ITokenInformation : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Expiry time of token. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Expiry time of token.", + SerializedName = @"expiryTimeInUtcTicks", + PossibleTypes = new [] { typeof(long) })] + long? ExpiryTimeInUtcTick { get; set; } + /// Security PIN + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Security PIN", + SerializedName = @"securityPIN", + PossibleTypes = new [] { typeof(string) })] + string SecurityPin { get; set; } + /// Token value. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Token value.", + SerializedName = @"token", + PossibleTypes = new [] { typeof(string) })] + string Token { get; set; } + + } + /// The token information details. + internal partial interface ITokenInformationInternal + + { + /// Expiry time of token. + long? ExpiryTimeInUtcTick { get; set; } + /// Security PIN + string SecurityPin { get; set; } + /// Token value. + string Token { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TokenInformation.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TokenInformation.json.cs new file mode 100644 index 000000000000..281b6a764394 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TokenInformation.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// The token information details. + public partial class TokenInformation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITokenInformation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITokenInformation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITokenInformation FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new TokenInformation(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._token)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._token.ToString()) : null, "token" ,container.Add ); + AddIf( null != this._expiryTimeInUtcTick ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._expiryTimeInUtcTick) : null, "expiryTimeInUtcTicks" ,container.Add ); + AddIf( null != (((object)this._securityPin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._securityPin.ToString()) : null, "securityPIN" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal TokenInformation(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_token = If( json?.PropertyT("token"), out var __jsonToken) ? (string)__jsonToken : (string)Token;} + {_expiryTimeInUtcTick = If( json?.PropertyT("expiryTimeInUtcTicks"), out var __jsonExpiryTimeInUtcTicks) ? (long?)__jsonExpiryTimeInUtcTicks : ExpiryTimeInUtcTick;} + {_securityPin = If( json?.PropertyT("securityPIN"), out var __jsonSecurityPin) ? (string)__jsonSecurityPin : (string)SecurityPin;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TriggerDataMoveRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TriggerDataMoveRequest.cs new file mode 100644 index 000000000000..9fa7c319466d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TriggerDataMoveRequest.cs @@ -0,0 +1,136 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Trigger DataMove Request + public partial class TriggerDataMoveRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITriggerDataMoveRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITriggerDataMoveRequestInternal + { + + /// Backing field for property. + private string _correlationId; + + /// Correlation Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string CorrelationId { get => this._correlationId; set => this._correlationId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel _dataMoveLevel; + + /// DataMove Level + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel DataMoveLevel { get => this._dataMoveLevel; set => this._dataMoveLevel = value; } + + /// Backing field for property. + private bool? _pauseGc; + + /// Pause GC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public bool? PauseGc { get => this._pauseGc; set => this._pauseGc = value; } + + /// Backing field for property. + private string[] _sourceContainerArmId; + + /// Source Container ArmIds + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] SourceContainerArmId { get => this._sourceContainerArmId; set => this._sourceContainerArmId = value; } + + /// Backing field for property. + private string _sourceRegion; + + /// Source Region + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceRegion { get => this._sourceRegion; set => this._sourceRegion = value; } + + /// Backing field for property. + private string _sourceResourceId; + + /// ARM Id of source vault + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; set => this._sourceResourceId = value; } + + /// Creates an new instance. + public TriggerDataMoveRequest() + { + + } + } + /// Trigger DataMove Request + public partial interface ITriggerDataMoveRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Correlation Id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Correlation Id", + SerializedName = @"correlationId", + PossibleTypes = new [] { typeof(string) })] + string CorrelationId { get; set; } + /// DataMove Level + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DataMove Level", + SerializedName = @"dataMoveLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel DataMoveLevel { get; set; } + /// Pause GC + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Pause GC", + SerializedName = @"pauseGC", + PossibleTypes = new [] { typeof(bool) })] + bool? PauseGc { get; set; } + /// Source Container ArmIds + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Container ArmIds", + SerializedName = @"sourceContainerArmIds", + PossibleTypes = new [] { typeof(string) })] + string[] SourceContainerArmId { get; set; } + /// Source Region + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Source Region", + SerializedName = @"sourceRegion", + PossibleTypes = new [] { typeof(string) })] + string SourceRegion { get; set; } + /// ARM Id of source vault + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"ARM Id of source vault", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + + } + /// Trigger DataMove Request + internal partial interface ITriggerDataMoveRequestInternal + + { + /// Correlation Id + string CorrelationId { get; set; } + /// DataMove Level + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel DataMoveLevel { get; set; } + /// Pause GC + bool? PauseGc { get; set; } + /// Source Container ArmIds + string[] SourceContainerArmId { get; set; } + /// Source Region + string SourceRegion { get; set; } + /// ARM Id of source vault + string SourceResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TriggerDataMoveRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TriggerDataMoveRequest.json.cs new file mode 100644 index 000000000000..e83f313168b1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/TriggerDataMoveRequest.json.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Trigger DataMove Request + public partial class TriggerDataMoveRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITriggerDataMoveRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITriggerDataMoveRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITriggerDataMoveRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new TriggerDataMoveRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); + AddIf( null != (((object)this._sourceRegion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._sourceRegion.ToString()) : null, "sourceRegion" ,container.Add ); + AddIf( null != (((object)this._dataMoveLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._dataMoveLevel.ToString()) : null, "dataMoveLevel" ,container.Add ); + AddIf( null != (((object)this._correlationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._correlationId.ToString()) : null, "correlationId" ,container.Add ); + if (null != this._sourceContainerArmId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._sourceContainerArmId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("sourceContainerArmIds",__w); + } + AddIf( null != this._pauseGc ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonBoolean((bool)this._pauseGc) : null, "pauseGC" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal TriggerDataMoveRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + {_sourceRegion = If( json?.PropertyT("sourceRegion"), out var __jsonSourceRegion) ? (string)__jsonSourceRegion : (string)SourceRegion;} + {_dataMoveLevel = If( json?.PropertyT("dataMoveLevel"), out var __jsonDataMoveLevel) ? (string)__jsonDataMoveLevel : (string)DataMoveLevel;} + {_correlationId = If( json?.PropertyT("correlationId"), out var __jsonCorrelationId) ? (string)__jsonCorrelationId : (string)CorrelationId;} + {_sourceContainerArmId = If( json?.PropertyT("sourceContainerArmIds"), out var __jsonSourceContainerArmIds) ? If( __jsonSourceContainerArmIds as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : SourceContainerArmId;} + {_pauseGc = If( json?.PropertyT("pauseGC"), out var __jsonPauseGc) ? (bool?)__jsonPauseGc : PauseGc;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteRequest.cs new file mode 100644 index 000000000000..44ea05ead0c2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteRequest.cs @@ -0,0 +1,64 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request body of unlock delete API. + public partial class UnlockDeleteRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteRequestInternal + { + + /// Backing field for property. + private string[] _resourceGuardOperationRequest; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] ResourceGuardOperationRequest { get => this._resourceGuardOperationRequest; set => this._resourceGuardOperationRequest = value; } + + /// Backing field for property. + private string _resourceToBeDeleted; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceToBeDeleted { get => this._resourceToBeDeleted; set => this._resourceToBeDeleted = value; } + + /// Creates an new instance. + public UnlockDeleteRequest() + { + + } + } + /// Request body of unlock delete API. + public partial interface IUnlockDeleteRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] ResourceGuardOperationRequest { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"resourceToBeDeleted", + PossibleTypes = new [] { typeof(string) })] + string ResourceToBeDeleted { get; set; } + + } + /// Request body of unlock delete API. + internal partial interface IUnlockDeleteRequestInternal + + { + string[] ResourceGuardOperationRequest { get; set; } + + string ResourceToBeDeleted { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteRequest.json.cs new file mode 100644 index 000000000000..62569d969d84 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteRequest.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Request body of unlock delete API. + public partial class UnlockDeleteRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new UnlockDeleteRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._resourceGuardOperationRequest) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourceGuardOperationRequest ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("resourceGuardOperationRequests",__w); + } + AddIf( null != (((object)this._resourceToBeDeleted)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceToBeDeleted.ToString()) : null, "resourceToBeDeleted" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal UnlockDeleteRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceGuardOperationRequest = If( json?.PropertyT("resourceGuardOperationRequests"), out var __jsonResourceGuardOperationRequests) ? If( __jsonResourceGuardOperationRequests as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ResourceGuardOperationRequest;} + {_resourceToBeDeleted = If( json?.PropertyT("resourceToBeDeleted"), out var __jsonResourceToBeDeleted) ? (string)__jsonResourceToBeDeleted : (string)ResourceToBeDeleted;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteResponse.cs new file mode 100644 index 000000000000..f5cd5ea570bf --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteResponse.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response of Unlock Delete API. + public partial class UnlockDeleteResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteResponseInternal + { + + /// Backing field for property. + private string _unlockDeleteExpiryTime; + + /// This is the time when unlock delete privileges will get expired. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string UnlockDeleteExpiryTime { get => this._unlockDeleteExpiryTime; set => this._unlockDeleteExpiryTime = value; } + + /// Creates an new instance. + public UnlockDeleteResponse() + { + + } + } + /// Response of Unlock Delete API. + public partial interface IUnlockDeleteResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// This is the time when unlock delete privileges will get expired. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the time when unlock delete privileges will get expired.", + SerializedName = @"unlockDeleteExpiryTime", + PossibleTypes = new [] { typeof(string) })] + string UnlockDeleteExpiryTime { get; set; } + + } + /// Response of Unlock Delete API. + internal partial interface IUnlockDeleteResponseInternal + + { + /// This is the time when unlock delete privileges will get expired. + string UnlockDeleteExpiryTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteResponse.json.cs new file mode 100644 index 000000000000..9ac6a2699004 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UnlockDeleteResponse.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Response of Unlock Delete API. + public partial class UnlockDeleteResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new UnlockDeleteResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._unlockDeleteExpiryTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._unlockDeleteExpiryTime.ToString()) : null, "unlockDeleteExpiryTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal UnlockDeleteResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_unlockDeleteExpiryTime = If( json?.PropertyT("unlockDeleteExpiryTime"), out var __jsonUnlockDeleteExpiryTime) ? (string)__jsonUnlockDeleteExpiryTime : (string)UnlockDeleteExpiryTime;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedIdentityProperties.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedIdentityProperties.cs new file mode 100644 index 000000000000..4f8cddb006cf --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedIdentityProperties.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// User assigned managed identity properties + public partial class UserAssignedIdentityProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityPropertiesInternal + { + + /// Backing field for property. + private string _clientId; + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ClientId { get => this._clientId; set => this._clientId = value; } + + /// Backing field for property. + private string _principalId; + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PrincipalId { get => this._principalId; set => this._principalId = value; } + + /// Creates an new instance. + public UserAssignedIdentityProperties() + { + + } + } + /// User assigned managed identity properties + public partial interface IUserAssignedIdentityProperties : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The client ID of the assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string ClientId { get; set; } + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The principal ID of the assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string PrincipalId { get; set; } + + } + /// User assigned managed identity properties + internal partial interface IUserAssignedIdentityPropertiesInternal + + { + /// The client ID of the assigned identity. + string ClientId { get; set; } + /// The principal ID of the assigned identity. + string PrincipalId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedIdentityProperties.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedIdentityProperties.json.cs new file mode 100644 index 000000000000..a2ea82bea931 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedIdentityProperties.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// User assigned managed identity properties + public partial class UserAssignedIdentityProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new UserAssignedIdentityProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._clientId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._clientId.ToString()) : null, "clientId" ,container.Add ); + AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal UserAssignedIdentityProperties(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedManagedIdentityDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedManagedIdentityDetails.cs new file mode 100644 index 000000000000..f015cd33b5e7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedManagedIdentityDetails.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// User assigned managed identity details + public partial class UserAssignedManagedIdentityDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal + { + + /// Backing field for property. + private string _identityArmId; + + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string IdentityArmId { get => this._identityArmId; set => this._identityArmId = value; } + + /// Backing field for property. + private string _identityName; + + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string IdentityName { get => this._identityName; set => this._identityName = value; } + + /// Internal Acessors for UserAssignedIdentityProperty + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetailsInternal.UserAssignedIdentityProperty { get => (this._userAssignedIdentityProperty = this._userAssignedIdentityProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UserAssignedIdentityProperties()); set { {_userAssignedIdentityProperty = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties _userAssignedIdentityProperty; + + /// User assigned managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedIdentityProperty { get => (this._userAssignedIdentityProperty = this._userAssignedIdentityProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UserAssignedIdentityProperties()); set => this._userAssignedIdentityProperty = value; } + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedIdentityPropertyClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityPropertiesInternal)UserAssignedIdentityProperty).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityPropertiesInternal)UserAssignedIdentityProperty).ClientId = value ?? null; } + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string UserAssignedIdentityPropertyPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityPropertiesInternal)UserAssignedIdentityProperty).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityPropertiesInternal)UserAssignedIdentityProperty).PrincipalId = value ?? null; } + + /// Creates an new instance. + public UserAssignedManagedIdentityDetails() + { + + } + } + /// User assigned managed identity details + public partial interface IUserAssignedManagedIdentityDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// The ARM id of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ARM id of the assigned identity.", + SerializedName = @"identityArmId", + PossibleTypes = new [] { typeof(string) })] + string IdentityArmId { get; set; } + /// The name of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the assigned identity.", + SerializedName = @"identityName", + PossibleTypes = new [] { typeof(string) })] + string IdentityName { get; set; } + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The client ID of the assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentityPropertyClientId { get; set; } + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The principal ID of the assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string UserAssignedIdentityPropertyPrincipalId { get; set; } + + } + /// User assigned managed identity details + internal partial interface IUserAssignedManagedIdentityDetailsInternal + + { + /// The ARM id of the assigned identity. + string IdentityArmId { get; set; } + /// The name of the assigned identity. + string IdentityName { get; set; } + /// User assigned managed identity properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedIdentityProperties UserAssignedIdentityProperty { get; set; } + /// The client ID of the assigned identity. + string UserAssignedIdentityPropertyClientId { get; set; } + /// The principal ID of the assigned identity. + string UserAssignedIdentityPropertyPrincipalId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedManagedIdentityDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedManagedIdentityDetails.json.cs new file mode 100644 index 000000000000..072309a171db --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/UserAssignedManagedIdentityDetails.json.cs @@ -0,0 +1,113 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// User assigned managed identity details + public partial class UserAssignedManagedIdentityDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUserAssignedManagedIdentityDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new UserAssignedManagedIdentityDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._userAssignedIdentityProperty ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._userAssignedIdentityProperty.ToJson(null,serializationMode) : null, "userAssignedIdentityProperties" ,container.Add ); + AddIf( null != (((object)this._identityArmId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._identityArmId.ToString()) : null, "identityArmId" ,container.Add ); + AddIf( null != (((object)this._identityName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._identityName.ToString()) : null, "identityName" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal UserAssignedManagedIdentityDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_userAssignedIdentityProperty = If( json?.PropertyT("userAssignedIdentityProperties"), out var __jsonUserAssignedIdentityProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UserAssignedIdentityProperties.FromJson(__jsonUserAssignedIdentityProperties) : UserAssignedIdentityProperty;} + {_identityArmId = If( json?.PropertyT("identityArmId"), out var __jsonIdentityArmId) ? (string)__jsonIdentityArmId : (string)IdentityArmId;} + {_identityName = If( json?.PropertyT("identityName"), out var __jsonIdentityName) ? (string)__jsonIdentityName : (string)IdentityName;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateIaasVMRestoreOperationRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateIaasVMRestoreOperationRequest.cs new file mode 100644 index 000000000000..2dc3172cddad --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateIaasVMRestoreOperationRequest.cs @@ -0,0 +1,73 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureRestoreValidation request. + public partial class ValidateIaasVMRestoreOperationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateIaasVMRestoreOperationRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateIaasVMRestoreOperationRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequest __validateRestoreOperationRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateRestoreOperationRequest(); + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestInternal)__validateRestoreOperationRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestInternal)__validateRestoreOperationRequest).ObjectType = value ; } + + /// Sets restore request to be validated + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest RestoreRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequestInternal)__validateRestoreOperationRequest).RestoreRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequestInternal)__validateRestoreOperationRequest).RestoreRequest = value ?? null /* model class */; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string RestoreRequestObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequestInternal)__validateRestoreOperationRequest).RestoreRequestObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequestInternal)__validateRestoreOperationRequest).RestoreRequestObjectType = value ?? null; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string[] RestoreRequestResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequestInternal)__validateRestoreOperationRequest).RestoreRequestResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequestInternal)__validateRestoreOperationRequest).RestoreRequestResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__validateRestoreOperationRequest), __validateRestoreOperationRequest); + await eventListener.AssertObjectIsValid(nameof(__validateRestoreOperationRequest), __validateRestoreOperationRequest); + } + + /// Creates an new instance. + public ValidateIaasVMRestoreOperationRequest() + { + + } + } + /// AzureRestoreValidation request. + public partial interface IValidateIaasVMRestoreOperationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequest + { + + } + /// AzureRestoreValidation request. + internal partial interface IValidateIaasVMRestoreOperationRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequestInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateIaasVMRestoreOperationRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateIaasVMRestoreOperationRequest.json.cs new file mode 100644 index 000000000000..becaf8adca27 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateIaasVMRestoreOperationRequest.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureRestoreValidation request. + public partial class ValidateIaasVMRestoreOperationRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateIaasVMRestoreOperationRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateIaasVMRestoreOperationRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateIaasVMRestoreOperationRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ValidateIaasVMRestoreOperationRequest(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __validateRestoreOperationRequest?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateIaasVMRestoreOperationRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __validateRestoreOperationRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateRestoreOperationRequest(json); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequest.cs new file mode 100644 index 000000000000..4a3de6b53276 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequest.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for validate operation request. + public partial class ValidateOperationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// Creates an new instance. + public ValidateOperationRequest() + { + + } + } + /// Base class for validate operation request. + public partial interface IValidateOperationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Base class for validate operation request. + internal partial interface IValidateOperationRequestInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequest.json.cs new file mode 100644 index 000000000000..6c53951bfeab --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequest.json.cs @@ -0,0 +1,127 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for validate operation request. + public partial class ValidateOperationRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "ValidateRestoreOperationRequest": + { + return new ValidateRestoreOperationRequest(json); + } + case "ValidateIaasVMRestoreOperationRequest": + { + return new ValidateIaasVMRestoreOperationRequest(json); + } + } + return new ValidateOperationRequest(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateOperationRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequestResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequestResource.cs new file mode 100644 index 000000000000..33b6c48ebf05 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequestResource.cs @@ -0,0 +1,83 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for validate operation request. + public partial class ValidateOperationRequestResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResourceInternal + { + + /// Backing field for property. + private string _id; + + /// Recovery point ID. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationRequest()); set { {_property = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestInternal)Property).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestInternal)Property).ObjectType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest _property; + + /// ValidateOperationRequestResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationRequest()); set => this._property = value; } + + /// Creates an new instance. + public ValidateOperationRequestResource() + { + + } + } + /// Base class for validate operation request. + public partial interface IValidateOperationRequestResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Recovery point ID. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Recovery point ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Base class for validate operation request. + internal partial interface IValidateOperationRequestResourceInternal + + { + /// Recovery point ID. + string Id { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + /// ValidateOperationRequestResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest Property { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequestResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequestResource.json.cs new file mode 100644 index 000000000000..e67f4c07eb53 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationRequestResource.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for validate operation request. + public partial class ValidateOperationRequestResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ValidateOperationRequestResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateOperationRequestResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationRequest.FromJson(__jsonProperties) : Property;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationResponse.cs new file mode 100644 index 000000000000..a2e646545bf9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationResponse.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for validate operation response. + public partial class ValidateOperationResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponseInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] _validationResult; + + /// Gets the validation result + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] ValidationResult { get => this._validationResult; set => this._validationResult = value; } + + /// Creates an new instance. + public ValidateOperationResponse() + { + + } + } + /// Base class for validate operation response. + public partial interface IValidateOperationResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Gets the validation result + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the validation result", + SerializedName = @"validationResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] ValidationResult { get; set; } + + } + /// Base class for validate operation response. + internal partial interface IValidateOperationResponseInternal + + { + /// Gets the validation result + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] ValidationResult { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationResponse.json.cs new file mode 100644 index 000000000000..cd05d2c690cc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationResponse.json.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Base class for validate operation response. + public partial class ValidateOperationResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ValidateOperationResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._validationResult) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._validationResult ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("validationResults",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateOperationResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_validationResult = If( json?.PropertyT("validationResults"), out var __jsonValidationResults) ? If( __jsonValidationResults as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ErrorDetail.FromJson(__u) )) ))() : null : ValidationResult;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationsResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationsResponse.cs new file mode 100644 index 000000000000..d2d5bebc3acd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationsResponse.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class ValidateOperationsResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationsResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationsResponseInternal + { + + /// Internal Acessors for ValidateOperationResponse + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationsResponseInternal.ValidateOperationResponse { get => (this._validateOperationResponse = this._validateOperationResponse ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationResponse()); set { {_validateOperationResponse = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse _validateOperationResponse; + + /// Base class for validate operation response. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse ValidateOperationResponse { get => (this._validateOperationResponse = this._validateOperationResponse ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationResponse()); set => this._validateOperationResponse = value; } + + /// Gets the validation result + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] ValidateOperationResponseValidationResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponseInternal)ValidateOperationResponse).ValidationResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponseInternal)ValidateOperationResponse).ValidationResult = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public ValidateOperationsResponse() + { + + } + } + public partial interface IValidateOperationsResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Gets the validation result + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets the validation result", + SerializedName = @"validationResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] ValidateOperationResponseValidationResult { get; set; } + + } + internal partial interface IValidateOperationsResponseInternal + + { + /// Base class for validate operation response. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationResponse ValidateOperationResponse { get; set; } + /// Gets the validation result + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail[] ValidateOperationResponseValidationResult { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationsResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationsResponse.json.cs new file mode 100644 index 000000000000..11dd8f7c3c89 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateOperationsResponse.json.cs @@ -0,0 +1,107 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class ValidateOperationsResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationsResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationsResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ValidateOperationsResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._validateOperationResponse ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._validateOperationResponse.ToJson(null,serializationMode) : null, "validateOperationResponse" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateOperationsResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_validateOperationResponse = If( json?.PropertyT("validateOperationResponse"), out var __jsonValidateOperationResponse) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationResponse.FromJson(__jsonValidateOperationResponse) : ValidateOperationResponse;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateRestoreOperationRequest.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateRestoreOperationRequest.cs new file mode 100644 index 000000000000..63cdc1cc2631 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateRestoreOperationRequest.cs @@ -0,0 +1,105 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureRestoreValidation request. + public partial class ValidateRestoreOperationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequest, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequestInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest __validateOperationRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationRequest(); + + /// Internal Acessors for RestoreRequest + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequestInternal.RestoreRequest { get => (this._restoreRequest = this._restoreRequest ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest()); set { {_restoreRequest = value;} } } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestInternal)__validateOperationRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestInternal)__validateOperationRequest).ObjectType = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest _restoreRequest; + + /// Sets restore request to be validated + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest RestoreRequest { get => (this._restoreRequest = this._restoreRequest ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest()); set => this._restoreRequest = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string RestoreRequestObjectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)RestoreRequest).ObjectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)RestoreRequest).ObjectType = value ?? null; } + + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] RestoreRequestResourceGuardOperationRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)RestoreRequest).ResourceGuardOperationRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestInternal)RestoreRequest).ResourceGuardOperationRequest = value ?? null /* arrayOf */; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__validateOperationRequest), __validateOperationRequest); + await eventListener.AssertObjectIsValid(nameof(__validateOperationRequest), __validateOperationRequest); + } + + /// Creates an new instance. + public ValidateRestoreOperationRequest() + { + + } + } + /// AzureRestoreValidation request. + public partial interface IValidateRestoreOperationRequest : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequest + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string RestoreRequestObjectType { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ResourceGuardOperationRequests on which LAC check will be performed", + SerializedName = @"resourceGuardOperationRequests", + PossibleTypes = new [] { typeof(string) })] + string[] RestoreRequestResourceGuardOperationRequest { get; set; } + + } + /// AzureRestoreValidation request. + internal partial interface IValidateRestoreOperationRequestInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestInternal + { + /// Sets restore request to be validated + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequest RestoreRequest { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string RestoreRequestObjectType { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed + string[] RestoreRequestResourceGuardOperationRequest { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateRestoreOperationRequest.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateRestoreOperationRequest.json.cs new file mode 100644 index 000000000000..1911fbfb68d3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/ValidateRestoreOperationRequest.json.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// AzureRestoreValidation request. + public partial class ValidateRestoreOperationRequest + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequest. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequest + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateRestoreOperationRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "ValidateIaasVMRestoreOperationRequest": + { + return new ValidateIaasVMRestoreOperationRequest(json); + } + } + return new ValidateRestoreOperationRequest(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __validateOperationRequest?.ToJson(container, serializationMode); + AddIf( null != this._restoreRequest ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._restoreRequest.ToJson(null,serializationMode) : null, "restoreRequest" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateRestoreOperationRequest(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __validateOperationRequest = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationRequest(json); + {_restoreRequest = If( json?.PropertyT("restoreRequest"), out var __jsonRestoreRequest) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RestoreRequest.FromJson(__jsonRestoreRequest) : RestoreRequest;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJob.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJob.cs new file mode 100644 index 000000000000..e14abd3fd286 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJob.cs @@ -0,0 +1,164 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Vault level Job + public partial class VaultJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJob, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] _actionsInfo; + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get => this._actionsInfo; set => this._actionsInfo = value; } + + /// ActivityId of job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ActivityId { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).ActivityId = value ?? null; } + + /// Backup management type to execute the current job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType? BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).BackupManagementType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType)""); } + + /// Backing field for property. + private global::System.TimeSpan? _duration; + + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.TimeSpan? Duration { get => this._duration; set => this._duration = value; } + + /// The end time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EndTime = value ?? default(global::System.DateTime); } + + /// Friendly name of the entity on which the current job is executing. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string EntityFriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).EntityFriendlyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo[] _errorDetail; + + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo[] ErrorDetail { get => this._errorDetail; set => this._errorDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfo _extendedInfo; + + /// Additional information about the job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfo ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultJobExtendedInfo()); set => this._extendedInfo = value; } + + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoInternal)ExtendedInfo).PropertyBag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoInternal)ExtendedInfo).PropertyBag = value ?? null /* model class */; } + + /// Internal Acessors for ExtendedInfo + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfo Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobInternal.ExtendedInfo { get => (this._extendedInfo = this._extendedInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultJobExtendedInfo()); set { {_extendedInfo = value;} } } + + /// The operation name. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Operation = value ?? null; } + + /// The start time. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).StartTime = value ?? default(global::System.DateTime); } + + /// Job status. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Status = value ?? null; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal)__job).Type = value ; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__job), __job); + await eventListener.AssertObjectIsValid(nameof(__job), __job); + } + + /// Creates an new instance. + public VaultJob() + { + + } + } + /// Vault level Job + public partial interface IVaultJob : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJob + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Gets or sets the state/actions applicable on this job like cancel/retry.", + SerializedName = @"actionsInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Time elapsed during the execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time elapsed during the execution of this job.", + SerializedName = @"duration", + PossibleTypes = new [] { typeof(global::System.TimeSpan) })] + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error details on execution of this job.", + SerializedName = @"errorDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo[] ErrorDetail { get; set; } + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + + } + /// Vault level Job + internal partial interface IVaultJobInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IJobInternal + { + /// Gets or sets the state/actions applicable on this job like cancel/retry. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction[] ActionsInfo { get; set; } + /// Time elapsed during the execution of this job. + global::System.TimeSpan? Duration { get; set; } + /// Error details on execution of this job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo[] ErrorDetail { get; set; } + /// Additional information about the job. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfo ExtendedInfo { get; set; } + /// Job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag ExtendedInfoPropertyBag { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJob.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJob.json.cs new file mode 100644 index 000000000000..c016a6abf850 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJob.json.cs @@ -0,0 +1,132 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Vault level Job + public partial class VaultJob + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJob. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJob. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new VaultJob(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __job?.ToJson(container, serializationMode); + AddIf( null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null,serializationMode) : null, "extendedInfo" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan)this._duration)): null), "duration" ,container.Add ); + if (null != this._actionsInfo) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._actionsInfo ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("actionsInfo",__w); + } + if (null != this._errorDetail) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._errorDetail ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("errorDetails",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal VaultJob(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __job = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Job(json); + {_extendedInfo = If( json?.PropertyT("extendedInfo"), out var __jsonExtendedInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultJobExtendedInfo.FromJson(__jsonExtendedInfo) : ExtendedInfo;} + {_duration = If( json?.PropertyT("duration"), out var __jsonDuration) ? global::System.Xml.XmlConvert.ToTimeSpan( __jsonDuration ) : Duration;} + {_actionsInfo = If( json?.PropertyT("actionsInfo"), out var __jsonActionsInfo) ? If( __jsonActionsInfo as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction)""))) ))() : null : ActionsInfo;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? If( __jsonErrorDetails as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultJobErrorInfo.FromJson(__p) )) ))() : null : ErrorDetail;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobErrorInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobErrorInfo.cs new file mode 100644 index 000000000000..d00d804422e6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobErrorInfo.cs @@ -0,0 +1,85 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Vault Job specific error information + public partial class VaultJobErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfoInternal + { + + /// Backing field for property. + private int? _errorCode; + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int? ErrorCode { get => this._errorCode; set => this._errorCode = value; } + + /// Backing field for property. + private string _errorString; + + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ErrorString { get => this._errorString; set => this._errorString = value; } + + /// Backing field for property. + private string[] _recommendation; + + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string[] Recommendation { get => this._recommendation; set => this._recommendation = value; } + + /// Creates an new instance. + public VaultJobErrorInfo() + { + + } + } + /// Vault Job specific error information + public partial interface IVaultJobErrorInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Error code.", + SerializedName = @"errorCode", + PossibleTypes = new [] { typeof(int) })] + int? ErrorCode { get; set; } + /// Localized error string. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Localized error string.", + SerializedName = @"errorString", + PossibleTypes = new [] { typeof(string) })] + string ErrorString { get; set; } + /// List of localized recommendations for above error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of localized recommendations for above error code.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] Recommendation { get; set; } + + } + /// Vault Job specific error information + internal partial interface IVaultJobErrorInfoInternal + + { + /// Error code. + int? ErrorCode { get; set; } + /// Localized error string. + string ErrorString { get; set; } + /// List of localized recommendations for above error code. + string[] Recommendation { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobErrorInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobErrorInfo.json.cs new file mode 100644 index 000000000000..a5527043e53d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobErrorInfo.json.cs @@ -0,0 +1,120 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Vault Job specific error information + public partial class VaultJobErrorInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobErrorInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new VaultJobErrorInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._errorCode ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((int)this._errorCode) : null, "errorCode" ,container.Add ); + AddIf( null != (((object)this._errorString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._errorString.ToString()) : null, "errorString" ,container.Add ); + if (null != this._recommendation) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._recommendation ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("recommendations",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal VaultJobErrorInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_errorCode = If( json?.PropertyT("errorCode"), out var __jsonErrorCode) ? (int?)__jsonErrorCode : ErrorCode;} + {_errorString = If( json?.PropertyT("errorString"), out var __jsonErrorString) ? (string)__jsonErrorString : (string)ErrorString;} + {_recommendation = If( json?.PropertyT("recommendations"), out var __jsonRecommendations) ? If( __jsonRecommendations as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Recommendation;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfo.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfo.cs new file mode 100644 index 000000000000..d7cc4354f5b7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfo.cs @@ -0,0 +1,51 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Vault Job for CMK - has CMK specific info. + public partial class VaultJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfo, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag _propertyBag; + + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag PropertyBag { get => (this._propertyBag = this._propertyBag ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultJobExtendedInfoPropertyBag()); set => this._propertyBag = value; } + + /// Creates an new instance. + public VaultJobExtendedInfo() + { + + } + } + /// Vault Job for CMK - has CMK specific info. + public partial interface IVaultJobExtendedInfo : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Job properties. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Job properties.", + SerializedName = @"propertyBag", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag PropertyBag { get; set; } + + } + /// Vault Job for CMK - has CMK specific info. + internal partial interface IVaultJobExtendedInfoInternal + + { + /// Job properties. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag PropertyBag { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfo.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfo.json.cs new file mode 100644 index 000000000000..9e27e5d046b5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfo.json.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Vault Job for CMK - has CMK specific info. + public partial class VaultJobExtendedInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new VaultJobExtendedInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._propertyBag ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._propertyBag.ToJson(null,serializationMode) : null, "propertyBag" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal VaultJobExtendedInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_propertyBag = If( json?.PropertyT("propertyBag"), out var __jsonPropertyBag) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultJobExtendedInfoPropertyBag.FromJson(__jsonPropertyBag) : PropertyBag;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfoPropertyBag.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfoPropertyBag.cs new file mode 100644 index 000000000000..fd9bfff9d66f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfoPropertyBag.cs @@ -0,0 +1,35 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job properties. + public partial class VaultJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBagInternal + { + + /// Creates an new instance. + public VaultJobExtendedInfoPropertyBag() + { + + } + } + /// Job properties. + public partial interface IVaultJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + + } + /// Job properties. + internal partial interface IVaultJobExtendedInfoPropertyBagInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfoPropertyBag.dictionary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfoPropertyBag.dictionary.cs new file mode 100644 index 000000000000..a2a8828b79fc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfoPropertyBag.dictionary.cs @@ -0,0 +1,75 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class VaultJobExtendedInfoPropertyBag : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultJobExtendedInfoPropertyBag source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfoPropertyBag.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfoPropertyBag.json.cs new file mode 100644 index 000000000000..b02d47ad067d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultJobExtendedInfoPropertyBag.json.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Job properties. + public partial class VaultJobExtendedInfoPropertyBag + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultJobExtendedInfoPropertyBag FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new VaultJobExtendedInfoPropertyBag(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + /// + internal VaultJobExtendedInfoPropertyBag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultRetentionPolicy.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultRetentionPolicy.cs new file mode 100644 index 000000000000..db2401931c15 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultRetentionPolicy.cs @@ -0,0 +1,80 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Vault retention policy for AzureFileShare + public partial class VaultRetentionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicy, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicyInternal + { + + /// Internal Acessors for VaultRetention + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicyInternal.VaultRetention { get => (this._vaultRetention = this._vaultRetention ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set { {_vaultRetention = value;} } } + + /// Backing field for property. + private int _snapshotRetentionInDay; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public int SnapshotRetentionInDay { get => this._snapshotRetentionInDay; set => this._snapshotRetentionInDay = value; } + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)VaultRetention).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicyInternal)VaultRetention).Type = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy _vaultRetention; + + /// Base class for retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy VaultRetention { get => (this._vaultRetention = this._vaultRetention ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy()); set => this._vaultRetention = value; } + + /// Creates an new instance. + public VaultRetentionPolicy() + { + + } + } + /// Vault retention policy for AzureFileShare + public partial interface IVaultRetentionPolicy : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"snapshotRetentionInDays", + PossibleTypes = new [] { typeof(int) })] + int SnapshotRetentionInDay { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"retentionPolicyType", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// Vault retention policy for AzureFileShare + internal partial interface IVaultRetentionPolicyInternal + + { + int SnapshotRetentionInDay { get; set; } + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string Type { get; set; } + /// Base class for retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionPolicy VaultRetention { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultRetentionPolicy.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultRetentionPolicy.json.cs new file mode 100644 index 000000000000..d3980e32bdfc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultRetentionPolicy.json.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Vault retention policy for AzureFileShare + public partial class VaultRetentionPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultRetentionPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new VaultRetentionPolicy(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._vaultRetention ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._vaultRetention.ToJson(null,serializationMode) : null, "vaultRetention" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber(this._snapshotRetentionInDay), "snapshotRetentionInDays" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal VaultRetentionPolicy(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_vaultRetention = If( json?.PropertyT("vaultRetention"), out var __jsonVaultRetention) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionPolicy.FromJson(__jsonVaultRetention) : VaultRetention;} + {_snapshotRetentionInDay = If( json?.PropertyT("snapshotRetentionInDays"), out var __jsonSnapshotRetentionInDays) ? (int)__jsonSnapshotRetentionInDays : SnapshotRetentionInDay;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultStorageConfigOperationResultResponse.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultStorageConfigOperationResultResponse.cs new file mode 100644 index 000000000000..11d5a243efaa --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultStorageConfigOperationResultResponse.cs @@ -0,0 +1,59 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation result response for Vault Storage Config + public partial class VaultStorageConfigOperationResultResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponse, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponseInternal + { + + /// Backing field for property. + private string _objectType; + + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ObjectType { get => this._objectType; set => this._objectType = value; } + + /// + /// Creates an new instance. + /// + public VaultStorageConfigOperationResultResponse() + { + + } + } + /// Operation result response for Vault Storage Config + public partial interface IVaultStorageConfigOperationResultResponse : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.", + SerializedName = @"objectType", + PossibleTypes = new [] { typeof(string) })] + string ObjectType { get; set; } + + } + /// Operation result response for Vault Storage Config + internal partial interface IVaultStorageConfigOperationResultResponseInternal + + { + /// + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// + string ObjectType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultStorageConfigOperationResultResponse.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultStorageConfigOperationResultResponse.json.cs new file mode 100644 index 000000000000..46523591e6f1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/VaultStorageConfigOperationResultResponse.json.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Operation result response for Vault Storage Config + public partial class VaultStorageConfigOperationResultResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponse. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponse + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IVaultStorageConfigOperationResultResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("objectType") ) + { + case "PrepareDataMoveResponse": + { + return new PrepareDataMoveResponse(json); + } + } + return new VaultStorageConfigOperationResultResponse(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal VaultStorageConfigOperationResultResponse(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_objectType = If( json?.PropertyT("objectType"), out var __jsonObjectType) ? (string)__jsonObjectType : (string)ObjectType;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionFormat.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionFormat.cs new file mode 100644 index 000000000000..0233fc69f96f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionFormat.cs @@ -0,0 +1,68 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Weekly retention format. + public partial class WeeklyRetentionFormat : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormatInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] _daysOfTheWeek; + + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] DaysOfTheWeek { get => this._daysOfTheWeek; set => this._daysOfTheWeek = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] _weeksOfTheMonth; + + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] WeeksOfTheMonth { get => this._weeksOfTheMonth; set => this._weeksOfTheMonth = value; } + + /// Creates an new instance. + public WeeklyRetentionFormat() + { + + } + } + /// Weekly retention format. + public partial interface IWeeklyRetentionFormat : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the week.", + SerializedName = @"daysOfTheWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] DaysOfTheWeek { get; set; } + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of weeks of month.", + SerializedName = @"weeksOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] WeeksOfTheMonth { get; set; } + + } + /// Weekly retention format. + internal partial interface IWeeklyRetentionFormatInternal + + { + /// List of days of the week. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] DaysOfTheWeek { get; set; } + /// List of weeks of month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] WeeksOfTheMonth { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionFormat.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionFormat.json.cs new file mode 100644 index 000000000000..6a694f6f781a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionFormat.json.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Weekly retention format. + public partial class WeeklyRetentionFormat + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new WeeklyRetentionFormat(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._daysOfTheWeek) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._daysOfTheWeek ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("daysOfTheWeek",__w); + } + if (null != this._weeksOfTheMonth) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._weeksOfTheMonth ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("weeksOfTheMonth",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WeeklyRetentionFormat(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_daysOfTheWeek = If( json?.PropertyT("daysOfTheWeek"), out var __jsonDaysOfTheWeek) ? If( __jsonDaysOfTheWeek as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek)""))) ))() : null : DaysOfTheWeek;} + {_weeksOfTheMonth = If( json?.PropertyT("weeksOfTheMonth"), out var __jsonWeeksOfTheMonth) ? If( __jsonWeeksOfTheMonth as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth) (__p is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth)""))) ))() : null : WeeksOfTheMonth;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionSchedule.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionSchedule.cs new file mode 100644 index 000000000000..b93bc358c1f5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionSchedule.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Weekly retention schedule. + public partial class WeeklyRetentionSchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionSchedule, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] _daysOfTheWeek; + + /// List of days of week for weekly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] DaysOfTheWeek { get => this._daysOfTheWeek; set => this._daysOfTheWeek = value; } + + /// Internal Acessors for RetentionDuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionScheduleInternal.RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set { {_retentionDuration = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration _retentionDuration; + + /// Retention duration of retention Policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set => this._retentionDuration = value; } + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? RetentionDurationCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count = value ?? default(int); } + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType)""); } + + /// Backing field for property. + private global::System.DateTime[] _retentionTime; + + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime[] RetentionTime { get => this._retentionTime; set => this._retentionTime = value; } + + /// Creates an new instance. + public WeeklyRetentionSchedule() + { + + } + } + /// Weekly retention schedule. + public partial interface IWeeklyRetentionSchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of days of week for weekly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of week for weekly retention policy.", + SerializedName = @"daysOfTheWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] DaysOfTheWeek { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention times of retention policy.", + SerializedName = @"retentionTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] RetentionTime { get; set; } + + } + /// Weekly retention schedule. + internal partial interface IWeeklyRetentionScheduleInternal + + { + /// List of days of week for weekly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] DaysOfTheWeek { get; set; } + /// Retention duration of retention Policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + /// Retention times of retention policy. + global::System.DateTime[] RetentionTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionSchedule.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionSchedule.json.cs new file mode 100644 index 000000000000..59c9b4f943c6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklyRetentionSchedule.json.cs @@ -0,0 +1,128 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Weekly retention schedule. + public partial class WeeklyRetentionSchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionSchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionSchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionSchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new WeeklyRetentionSchedule(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._retentionDuration ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionDuration.ToJson(null,serializationMode) : null, "retentionDuration" ,container.Add ); + if (null != this._daysOfTheWeek) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._daysOfTheWeek ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("daysOfTheWeek",__w); + } + if (null != this._retentionTime) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._retentionTime ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__s.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) ,__r.Add); + } + container.Add("retentionTimes",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WeeklyRetentionSchedule(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_retentionDuration = If( json?.PropertyT("retentionDuration"), out var __jsonRetentionDuration) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration.FromJson(__jsonRetentionDuration) : RetentionDuration;} + {_daysOfTheWeek = If( json?.PropertyT("daysOfTheWeek"), out var __jsonDaysOfTheWeek) ? If( __jsonDaysOfTheWeek as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek)""))) ))() : null : DaysOfTheWeek;} + {_retentionTime = If( json?.PropertyT("retentionTimes"), out var __jsonRetentionTimes) ? If( __jsonRetentionTimes as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(global::System.DateTime) (__p is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __o ? global::System.DateTime.TryParse((string)__o, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __oValue) ? __oValue : default(global::System.DateTime) : default(global::System.DateTime))) ))() : null : RetentionTime;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklySchedule.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklySchedule.cs new file mode 100644 index 000000000000..94245e81d742 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklySchedule.cs @@ -0,0 +1,62 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class WeeklySchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklySchedule, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyScheduleInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] _scheduleRunDay; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] ScheduleRunDay { get => this._scheduleRunDay; set => this._scheduleRunDay = value; } + + /// Backing field for property. + private global::System.DateTime[] _scheduleRunTime; + + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime[] ScheduleRunTime { get => this._scheduleRunTime; set => this._scheduleRunTime = value; } + + /// Creates an new instance. + public WeeklySchedule() + { + + } + } + public partial interface IWeeklySchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"scheduleRunDays", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] ScheduleRunDay { get; set; } + /// List of times of day this schedule has to be run. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of times of day this schedule has to be run.", + SerializedName = @"scheduleRunTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] ScheduleRunTime { get; set; } + + } + internal partial interface IWeeklyScheduleInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] ScheduleRunDay { get; set; } + /// List of times of day this schedule has to be run. + global::System.DateTime[] ScheduleRunTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklySchedule.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklySchedule.json.cs new file mode 100644 index 000000000000..098c6bf34d11 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WeeklySchedule.json.cs @@ -0,0 +1,125 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class WeeklySchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklySchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklySchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklySchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new WeeklySchedule(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._scheduleRunDay) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._scheduleRunDay ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("scheduleRunDays",__w); + } + if (null != this._scheduleRunTime) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._scheduleRunTime ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__s.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) ,__r.Add); + } + container.Add("scheduleRunTimes",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WeeklySchedule(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_scheduleRunDay = If( json?.PropertyT("scheduleRunDays"), out var __jsonScheduleRunDays) ? If( __jsonScheduleRunDays as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek)""))) ))() : null : ScheduleRunDay;} + {_scheduleRunTime = If( json?.PropertyT("scheduleRunTimes"), out var __jsonScheduleRunTimes) ? If( __jsonScheduleRunTimes as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(global::System.DateTime) (__p is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __o ? global::System.DateTime.TryParse((string)__o, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __oValue) ? __oValue : default(global::System.DateTime) : default(global::System.DateTime))) ))() : null : ScheduleRunTime;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadInquiryDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadInquiryDetails.cs new file mode 100644 index 000000000000..b4cccd429241 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadInquiryDetails.cs @@ -0,0 +1,184 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Details of an inquired protectable item. + public partial class WorkloadInquiryDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetailsInternal + { + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetailCode; } + + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetailMessage; } + + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string[] ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetailRecommendation; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidation _inquiryValidation; + + /// Inquiry validation such as permissions and other backup validations. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidation InquiryValidation { get => (this._inquiryValidation = this._inquiryValidation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InquiryValidation()); set => this._inquiryValidation = value; } + + /// Error Additional Detail in case the status is non-success. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string InquiryValidationAdditionalDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).AdditionalDetail; } + + /// Dictionary to store the count of ProtectableItems with key POType. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny InquiryValidationProtectableItemCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ProtectableItemCount; } + + /// Status for the Inquiry Validation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string InquiryValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).Status = value ?? null; } + + /// Backing field for property. + private long? _itemCount; + + /// Contains the protectable item Count inside this Container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public long? ItemCount { get => this._itemCount; set => this._itemCount = value; } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetailsInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetailCode = value; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetailsInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetailMessage = value; } + + /// Internal Acessors for ErrorDetailRecommendation + string[] Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetailsInternal.ErrorDetailRecommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetailRecommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetailRecommendation = value; } + + /// Internal Acessors for InquiryValidation + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidation Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetailsInternal.InquiryValidation { get => (this._inquiryValidation = this._inquiryValidation ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InquiryValidation()); set { {_inquiryValidation = value;} } } + + /// Internal Acessors for InquiryValidationAdditionalDetail + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetailsInternal.InquiryValidationAdditionalDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).AdditionalDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).AdditionalDetail = value; } + + /// Internal Acessors for InquiryValidationErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetailsInternal.InquiryValidationErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ErrorDetail = value; } + + /// Internal Acessors for InquiryValidationProtectableItemCount + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetailsInternal.InquiryValidationProtectableItemCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ProtectableItemCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidationInternal)InquiryValidation).ProtectableItemCount = value; } + + /// Backing field for property. + private string _type; + + /// Type of the Workload such as SQL, Oracle etc. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public WorkloadInquiryDetails() + { + + } + } + /// Details of an inquired protectable item. + public partial interface IWorkloadInquiryDetails : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; } + /// Error Message related to the Code. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Message related to the Code.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; } + /// List of recommendation strings. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of recommendation strings.", + SerializedName = @"recommendations", + PossibleTypes = new [] { typeof(string) })] + string[] ErrorDetailRecommendation { get; } + /// Error Additional Detail in case the status is non-success. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error Additional Detail in case the status is non-success.", + SerializedName = @"additionalDetail", + PossibleTypes = new [] { typeof(string) })] + string InquiryValidationAdditionalDetail { get; } + /// Dictionary to store the count of ProtectableItems with key POType. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Dictionary to store the count of ProtectableItems with key POType.", + SerializedName = @"protectableItemCount", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny InquiryValidationProtectableItemCount { get; } + /// Status for the Inquiry Validation. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status for the Inquiry Validation.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string InquiryValidationStatus { get; set; } + /// Contains the protectable item Count inside this Container. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Contains the protectable item Count inside this Container.", + SerializedName = @"itemCount", + PossibleTypes = new [] { typeof(long) })] + long? ItemCount { get; set; } + /// Type of the Workload such as SQL, Oracle etc. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the Workload such as SQL, Oracle etc.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// Details of an inquired protectable item. + internal partial interface IWorkloadInquiryDetailsInternal + + { + /// Error code. + string ErrorDetailCode { get; set; } + /// Error Message related to the Code. + string ErrorDetailMessage { get; set; } + /// List of recommendation strings. + string[] ErrorDetailRecommendation { get; set; } + /// Inquiry validation such as permissions and other backup validations. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IInquiryValidation InquiryValidation { get; set; } + /// Error Additional Detail in case the status is non-success. + string InquiryValidationAdditionalDetail { get; set; } + /// Error Detail in case the status is non-success. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IErrorDetail InquiryValidationErrorDetail { get; set; } + /// Dictionary to store the count of ProtectableItems with key POType. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny InquiryValidationProtectableItemCount { get; set; } + /// Status for the Inquiry Validation. + string InquiryValidationStatus { get; set; } + /// Contains the protectable item Count inside this Container. + long? ItemCount { get; set; } + /// Type of the Workload such as SQL, Oracle etc. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadInquiryDetails.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadInquiryDetails.json.cs new file mode 100644 index 000000000000..11fcedf99ac7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadInquiryDetails.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Details of an inquired protectable item. + public partial class WorkloadInquiryDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadInquiryDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new WorkloadInquiryDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._inquiryValidation ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._inquiryValidation.ToJson(null,serializationMode) : null, "inquiryValidation" ,container.Add ); + 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 ); + AddIf( null != this._itemCount ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNumber((long)this._itemCount) : null, "itemCount" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WorkloadInquiryDetails(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_inquiryValidation = If( json?.PropertyT("inquiryValidation"), out var __jsonInquiryValidation) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.InquiryValidation.FromJson(__jsonInquiryValidation) : InquiryValidation;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_itemCount = If( json?.PropertyT("itemCount"), out var __jsonItemCount) ? (long?)__jsonItemCount : ItemCount;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItem.cs new file mode 100644 index 000000000000..11c2dbdd48ce --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItem.cs @@ -0,0 +1,121 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup item. Workload-specific backup items are derived from this class. + /// + public partial class WorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal + { + + /// Backing field for property. + private string _backupManagementType; + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? _protectionState; + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// Backing field for property. + private string _type; + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Backing field for property. + private string _workloadType; + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public WorkloadItem() + { + + } + } + /// Base class for backup item. Workload-specific backup items are derived from this class. + public partial interface IWorkloadItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management to backup an item.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(string) })] + string BackupManagementType { get; set; } + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the backup item.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"State of the back up item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Type of the backup item.", + SerializedName = @"workloadItemType", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of workload for the backup management", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(string) })] + string WorkloadType { get; set; } + + } + /// Base class for backup item. Workload-specific backup items are derived from this class. + internal partial interface IWorkloadItemInternal + + { + /// Type of backup management to backup an item. + string BackupManagementType { get; set; } + /// Friendly name of the backup item. + string FriendlyName { get; set; } + /// State of the back up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// Type of the backup item. + string Type { get; set; } + /// Type of workload for the backup management + string WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItem.json.cs new file mode 100644 index 000000000000..22b676b84eed --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItem.json.cs @@ -0,0 +1,157 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup item. Workload-specific backup items are derived from this class. + /// + public partial class WorkloadItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("workloadItemType") ) + { + case "AzureVmWorkloadItem": + { + return new AzureVMWorkloadItem(json); + } + case "SAPAseDatabase": + { + return new AzureVMWorkloadSapAseDatabaseWorkloadItem(json); + } + case "SAPAseSystem": + { + return new AzureVMWorkloadSapAseSystemWorkloadItem(json); + } + case "SAPHanaDatabase": + { + return new AzureVMWorkloadSapHanaDatabaseWorkloadItem(json); + } + case "SAPHanaSystem": + { + return new AzureVMWorkloadSapHanaSystemWorkloadItem(json); + } + case "SQLDataBase": + { + return new AzureVMWorkloadSqlDatabaseWorkloadItem(json); + } + case "SQLInstance": + { + return new AzureVMWorkloadSqlInstanceWorkloadItem(json); + } + } + return new WorkloadItem(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + 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, "workloadItemType" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WorkloadItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + {_type = If( json?.PropertyT("workloadItemType"), out var __jsonWorkloadItemType) ? (string)__jsonWorkloadItemType : (string)Type;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResource.cs new file mode 100644 index 000000000000..b3657c1fac13 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResource.cs @@ -0,0 +1,172 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup item. Workload-specific backup items are derived from this class. + /// + public partial class WorkloadItemResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).BackupManagementType = value ?? null; } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).FriendlyName = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadItem()); set { {_property = value;} } } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem _property; + + /// WorkloadItemResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadItem()); set => this._property = value; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string WorkloadItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).Type = value ?? null; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemInternal)Property).WorkloadType = value ?? null; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + + /// Creates an new instance. + public WorkloadItemResource() + { + + } + } + /// Base class for backup item. Workload-specific backup items are derived from this class. + public partial interface IWorkloadItemResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management to backup an item.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(string) })] + string BackupManagementType { get; set; } + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the backup item.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"State of the back up item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the backup item.", + SerializedName = @"workloadItemType", + PossibleTypes = new [] { typeof(string) })] + string WorkloadItemType { get; set; } + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of workload for the backup management", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(string) })] + string WorkloadType { get; set; } + + } + /// Base class for backup item. Workload-specific backup items are derived from this class. + internal partial interface IWorkloadItemResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Type of backup management to backup an item. + string BackupManagementType { get; set; } + /// Friendly name of the backup item. + string FriendlyName { get; set; } + /// WorkloadItemResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItem Property { get; set; } + /// State of the back up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// Type of the backup item. + string WorkloadItemType { get; set; } + /// Type of workload for the backup management + string WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResource.json.cs new file mode 100644 index 000000000000..9bd1f964957a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResource.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup item. Workload-specific backup items are derived from this class. + /// + public partial class WorkloadItemResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new WorkloadItemResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WorkloadItemResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadItem.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResourceList.cs new file mode 100644 index 000000000000..e1257cc3d7ec --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of WorkloadItem resources + public partial class WorkloadItemResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource[] Value { get => this._value; set => this._value = value; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + + /// Creates an new instance. + public WorkloadItemResourceList() + { + + } + } + /// List of WorkloadItem resources + public partial interface IWorkloadItemResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource[] Value { get; set; } + + } + /// List of WorkloadItem resources + internal partial interface IWorkloadItemResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResourceList.json.cs new file mode 100644 index 000000000000..da709e78149d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadItemResourceList.json.cs @@ -0,0 +1,118 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of WorkloadItem resources + public partial class WorkloadItemResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new WorkloadItemResourceList(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WorkloadItemResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadItemResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadItemResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItem.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItem.cs new file mode 100644 index 000000000000..0027b2815eb2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItem.cs @@ -0,0 +1,121 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup item. Workload-specific backup items are derived from this class. + /// + public partial class WorkloadProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal + { + + /// Backing field for property. + private string _backupManagementType; + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupManagementType { get => this._backupManagementType; set => this._backupManagementType = value; } + + /// Backing field for property. + private string _friendlyName; + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FriendlyName { get => this._friendlyName; set => this._friendlyName = value; } + + /// Backing field for property. + private string _protectableItemType; + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectableItemType { get => this._protectableItemType; set => this._protectableItemType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? _protectionState; + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => this._protectionState; set => this._protectionState = value; } + + /// Backing field for property. + private string _workloadType; + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string WorkloadType { get => this._workloadType; set => this._workloadType = value; } + + /// Creates an new instance. + public WorkloadProtectableItem() + { + + } + } + /// Base class for backup item. Workload-specific backup items are derived from this class. + public partial interface IWorkloadProtectableItem : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management to backup an item.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(string) })] + string BackupManagementType { get; set; } + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the backup item.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Type of the backup item.", + SerializedName = @"protectableItemType", + PossibleTypes = new [] { typeof(string) })] + string ProtectableItemType { get; set; } + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"State of the back up item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of workload for the backup management", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(string) })] + string WorkloadType { get; set; } + + } + /// Base class for backup item. Workload-specific backup items are derived from this class. + internal partial interface IWorkloadProtectableItemInternal + + { + /// Type of backup management to backup an item. + string BackupManagementType { get; set; } + /// Friendly name of the backup item. + string FriendlyName { get; set; } + /// Type of the backup item. + string ProtectableItemType { get; set; } + /// State of the back up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// Type of workload for the backup management + string WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItem.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItem.json.cs new file mode 100644 index 000000000000..e764092cf4e7 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItem.json.cs @@ -0,0 +1,181 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup item. Workload-specific backup items are derived from this class. + /// + public partial class WorkloadProtectableItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("protectableItemType") ) + { + case "AzureFileShare": + { + return new AzureFileShareProtectableItem(json); + } + case "IaaSVMProtectableItem": + { + return new IaaSvmProtectableItem(json); + } + case "Microsoft.ClassicCompute/virtualMachines": + { + return new AzureIaaSClassicComputeVmprotectableItem(json); + } + case "Microsoft.Compute/virtualMachines": + { + return new AzureIaaSComputeVmprotectableItem(json); + } + case "AzureVmWorkloadProtectableItem": + { + return new AzureVMWorkloadProtectableItem(json); + } + case "SAPAseSystem": + { + return new AzureVMWorkloadSapAseSystemProtectableItem(json); + } + case "SAPHanaDatabase": + { + return new AzureVMWorkloadSapHanaDatabaseProtectableItem(json); + } + case "SAPHanaSystem": + { + return new AzureVMWorkloadSapHanaSystemProtectableItem(json); + } + case "SAPHanaDBInstance": + { + return new AzureVMWorkloadSapHanaDbinstance(json); + } + case "HanaHSRContainer": + { + return new AzureVMWorkloadSapHanaHsrprotectableItem(json); + } + case "SQLAvailabilityGroupContainer": + { + return new AzureVMWorkloadSqlAvailabilityGroupProtectableItem(json); + } + case "SQLDataBase": + { + return new AzureVMWorkloadSqlDatabaseProtectableItem(json); + } + case "SQLInstance": + { + return new AzureVMWorkloadSqlInstanceProtectableItem(json); + } + } + return new WorkloadProtectableItem(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._backupManagementType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupManagementType.ToString()) : null, "backupManagementType" ,container.Add ); + AddIf( null != (((object)this._workloadType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._workloadType.ToString()) : null, "workloadType" ,container.Add ); + AddIf( null != (((object)this._protectableItemType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectableItemType.ToString()) : null, "protectableItemType" ,container.Add ); + AddIf( null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName" ,container.Add ); + AddIf( null != (((object)this._protectionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectionState.ToString()) : null, "protectionState" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WorkloadProtectableItem(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_backupManagementType = If( json?.PropertyT("backupManagementType"), out var __jsonBackupManagementType) ? (string)__jsonBackupManagementType : (string)BackupManagementType;} + {_workloadType = If( json?.PropertyT("workloadType"), out var __jsonWorkloadType) ? (string)__jsonWorkloadType : (string)WorkloadType;} + {_protectableItemType = If( json?.PropertyT("protectableItemType"), out var __jsonProtectableItemType) ? (string)__jsonProtectableItemType : (string)ProtectableItemType;} + {_friendlyName = If( json?.PropertyT("friendlyName"), out var __jsonFriendlyName) ? (string)__jsonFriendlyName : (string)FriendlyName;} + {_protectionState = If( json?.PropertyT("protectionState"), out var __jsonProtectionState) ? (string)__jsonProtectionState : (string)ProtectionState;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResource.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResource.cs new file mode 100644 index 000000000000..c19d8571ef9b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResource.cs @@ -0,0 +1,172 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup item. Workload-specific backup items are derived from this class. + /// + public partial class WorkloadProtectableItemResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(); + + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string BackupManagementType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).BackupManagementType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).BackupManagementType = value ?? null; } + + /// Optional ETag. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string ETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).ETag = value ?? null; } + + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string FriendlyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).FriendlyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).FriendlyName = value ?? null; } + + /// Resource Id represents the complete path to the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Location = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItem()); set { {_property = value;} } } + + /// Resource name associated with the resource. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem _property; + + /// WorkloadProtectableItemResource properties + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItem()); set => this._property = value; } + + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string ProtectableItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).ProtectableItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).ProtectableItemType = value ?? null; } + + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).ProtectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).ProtectionState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Tag = value ?? null /* model class */; } + + /// + /// Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal)__resource).Type; } + + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public string WorkloadType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).WorkloadType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemInternal)Property).WorkloadType = value ?? null; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + + /// Creates an new instance. + public WorkloadProtectableItemResource() + { + + } + } + /// Base class for backup item. Workload-specific backup items are derived from this class. + public partial interface IWorkloadProtectableItemResource : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResource + { + /// Type of backup management to backup an item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of backup management to backup an item.", + SerializedName = @"backupManagementType", + PossibleTypes = new [] { typeof(string) })] + string BackupManagementType { get; set; } + /// Friendly name of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Friendly name of the backup item.", + SerializedName = @"friendlyName", + PossibleTypes = new [] { typeof(string) })] + string FriendlyName { get; set; } + /// Type of the backup item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of the backup item.", + SerializedName = @"protectableItemType", + PossibleTypes = new [] { typeof(string) })] + string ProtectableItemType { get; set; } + /// State of the back up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"State of the back up item.", + SerializedName = @"protectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// Type of workload for the backup management + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of workload for the backup management", + SerializedName = @"workloadType", + PossibleTypes = new [] { typeof(string) })] + string WorkloadType { get; set; } + + } + /// Base class for backup item. Workload-specific backup items are derived from this class. + internal partial interface IWorkloadProtectableItemResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceInternal + { + /// Type of backup management to backup an item. + string BackupManagementType { get; set; } + /// Friendly name of the backup item. + string FriendlyName { get; set; } + /// WorkloadProtectableItemResource properties + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItem Property { get; set; } + /// Type of the backup item. + string ProtectableItemType { get; set; } + /// State of the back up item. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus? ProtectionState { get; set; } + /// Type of workload for the backup management + string WorkloadType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResource.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResource.json.cs new file mode 100644 index 000000000000..0f40b750d8cb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResource.json.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Base class for backup item. Workload-specific backup items are derived from this class. + /// + public partial class WorkloadProtectableItemResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new WorkloadProtectableItemResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WorkloadProtectableItemResource(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItem.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResourceList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResourceList.cs new file mode 100644 index 000000000000..a0d2d7dd71d5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResourceList.cs @@ -0,0 +1,77 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of WorkloadProtectableItem resources + public partial class WorkloadProtectableItemResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResourceList, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResourceListInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(); + + /// + /// The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + /// to fetch the next page if the total number of resources exceeds 200. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inherited)] + public string NextLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal)__resourceList).NextLink = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource[] _value; + + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource[] Value { get => this._value; set => this._value = value; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resourceList), __resourceList); + await eventListener.AssertObjectIsValid(nameof(__resourceList), __resourceList); + } + + /// Creates an new instance. + public WorkloadProtectableItemResourceList() + { + + } + } + /// List of WorkloadProtectableItem resources + public partial interface IWorkloadProtectableItemResourceList : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceList + { + /// List of resources. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource[] Value { get; set; } + + } + /// List of WorkloadProtectableItem resources + internal partial interface IWorkloadProtectableItemResourceListInternal : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceListInternal + { + /// List of resources. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResourceList.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResourceList.json.cs new file mode 100644 index 000000000000..c3386e47d899 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/WorkloadProtectableItemResourceList.json.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// List of WorkloadProtectableItem resources + public partial class WorkloadProtectableItemResourceList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResourceList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResourceList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResourceList FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new WorkloadProtectableItemResourceList(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceList?.ToJson(container, serializationMode); + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal WorkloadProtectableItemResourceList(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceList = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceList(json); + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWorkloadProtectableItemResource) (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItemResource.FromJson(__u) )) ))() : null : Value;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/YearlyRetentionSchedule.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/YearlyRetentionSchedule.cs new file mode 100644 index 000000000000..bac109b75746 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/YearlyRetentionSchedule.cs @@ -0,0 +1,201 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Yearly retention schedule. + public partial class YearlyRetentionSchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionSchedule, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal + { + + /// Internal Acessors for RetentionDuration + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal.RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set { {_retentionDuration = value;} } } + + /// Internal Acessors for RetentionScheduleDaily + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal.RetentionScheduleDaily { get => (this._retentionScheduleDaily = this._retentionScheduleDaily ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailyRetentionFormat()); set { {_retentionScheduleDaily = value;} } } + + /// Internal Acessors for RetentionScheduleWeekly + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionScheduleInternal.RetentionScheduleWeekly { get => (this._retentionScheduleWeekly = this._retentionScheduleWeekly ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklyRetentionFormat()); set { {_retentionScheduleWeekly = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear[] _monthsOfYear; + + /// List of months of year of yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear[] MonthsOfYear { get => this._monthsOfYear; set => this._monthsOfYear = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration _retentionDuration; + + /// Retention duration of retention Policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get => (this._retentionDuration = this._retentionDuration ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration()); set => this._retentionDuration = value; } + + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public int? RetentionDurationCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).Count = value ?? default(int); } + + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDurationInternal)RetentionDuration).DurationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat _retentionScheduleDaily; + + /// Daily retention format for yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat RetentionScheduleDaily { get => (this._retentionScheduleDaily = this._retentionScheduleDaily ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailyRetentionFormat()); set => this._retentionScheduleDaily = value; } + + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] RetentionScheduleDailyDaysOfTheMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormatInternal)RetentionScheduleDaily).DaysOfTheMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormatInternal)RetentionScheduleDaily).DaysOfTheMonth = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? _retentionScheduleFormatType; + + /// Retention schedule format for yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? RetentionScheduleFormatType { get => this._retentionScheduleFormatType; set => this._retentionScheduleFormatType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat _retentionScheduleWeekly; + + /// Weekly retention format for yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat RetentionScheduleWeekly { get => (this._retentionScheduleWeekly = this._retentionScheduleWeekly ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklyRetentionFormat()); set => this._retentionScheduleWeekly = value; } + + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] RetentionScheduleWeeklyDaysOfTheWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormatInternal)RetentionScheduleWeekly).DaysOfTheWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormatInternal)RetentionScheduleWeekly).DaysOfTheWeek = value ?? null /* arrayOf */; } + + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] RetentionScheduleWeeklyWeeksOfTheMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormatInternal)RetentionScheduleWeekly).WeeksOfTheMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormatInternal)RetentionScheduleWeekly).WeeksOfTheMonth = value ?? null /* arrayOf */; } + + /// Backing field for property. + private global::System.DateTime[] _retentionTime; + + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public global::System.DateTime[] RetentionTime { get => this._retentionTime; set => this._retentionTime = value; } + + /// Creates an new instance. + public YearlyRetentionSchedule() + { + + } + } + /// Yearly retention schedule. + public partial interface IYearlyRetentionSchedule : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// List of months of year of yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of months of year of yearly retention policy.", + SerializedName = @"monthsOfYear", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear[] MonthsOfYear { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Count of duration types. Retention duration is obtained by the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention duration type of retention policy.", + SerializedName = @"durationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + /// List of days of the month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the month.", + SerializedName = @"daysOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] RetentionScheduleDailyDaysOfTheMonth { get; set; } + /// Retention schedule format for yearly retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention schedule format for yearly retention policy.", + SerializedName = @"retentionScheduleFormatType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? RetentionScheduleFormatType { get; set; } + /// List of days of the week. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of days of the week.", + SerializedName = @"daysOfTheWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] RetentionScheduleWeeklyDaysOfTheWeek { get; set; } + /// List of weeks of month. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of weeks of month.", + SerializedName = @"weeksOfTheMonth", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] RetentionScheduleWeeklyWeeksOfTheMonth { get; set; } + /// Retention times of retention policy. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention times of retention policy.", + SerializedName = @"retentionTimes", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime[] RetentionTime { get; set; } + + } + /// Yearly retention schedule. + internal partial interface IYearlyRetentionScheduleInternal + + { + /// List of months of year of yearly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear[] MonthsOfYear { get; set; } + /// Retention duration of retention Policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRetentionDuration RetentionDuration { get; set; } + /// + /// Count of duration types. Retention duration is obtained by the counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + /// + int? RetentionDurationCount { get; set; } + /// Retention duration type of retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType? RetentionDurationType { get; set; } + /// Daily retention format for yearly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDailyRetentionFormat RetentionScheduleDaily { get; set; } + /// List of days of the month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IDay[] RetentionScheduleDailyDaysOfTheMonth { get; set; } + /// Retention schedule format for yearly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat? RetentionScheduleFormatType { get; set; } + /// Weekly retention format for yearly retention policy. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IWeeklyRetentionFormat RetentionScheduleWeekly { get; set; } + /// List of days of the week. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek[] RetentionScheduleWeeklyDaysOfTheWeek { get; set; } + /// List of weeks of month. + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth[] RetentionScheduleWeeklyWeeksOfTheMonth { get; set; } + /// Retention times of retention policy. + global::System.DateTime[] RetentionTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/YearlyRetentionSchedule.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/YearlyRetentionSchedule.json.cs new file mode 100644 index 000000000000..818e8e5a73bd --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/Api20241001/YearlyRetentionSchedule.json.cs @@ -0,0 +1,134 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// Yearly retention schedule. + public partial class YearlyRetentionSchedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionSchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionSchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IYearlyRetentionSchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new YearlyRetentionSchedule(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._retentionScheduleDaily ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionScheduleDaily.ToJson(null,serializationMode) : null, "retentionScheduleDaily" ,container.Add ); + AddIf( null != this._retentionScheduleWeekly ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionScheduleWeekly.ToJson(null,serializationMode) : null, "retentionScheduleWeekly" ,container.Add ); + AddIf( null != this._retentionDuration ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._retentionDuration.ToJson(null,serializationMode) : null, "retentionDuration" ,container.Add ); + AddIf( null != (((object)this._retentionScheduleFormatType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._retentionScheduleFormatType.ToString()) : null, "retentionScheduleFormatType" ,container.Add ); + if (null != this._monthsOfYear) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __x in this._monthsOfYear ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("monthsOfYear",__w); + } + if (null != this._retentionTime) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.XNodeArray(); + foreach( var __s in this._retentionTime ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(__s.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) ,__r.Add); + } + container.Add("retentionTimes",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal YearlyRetentionSchedule(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_retentionScheduleDaily = If( json?.PropertyT("retentionScheduleDaily"), out var __jsonRetentionScheduleDaily) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.DailyRetentionFormat.FromJson(__jsonRetentionScheduleDaily) : RetentionScheduleDaily;} + {_retentionScheduleWeekly = If( json?.PropertyT("retentionScheduleWeekly"), out var __jsonRetentionScheduleWeekly) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WeeklyRetentionFormat.FromJson(__jsonRetentionScheduleWeekly) : RetentionScheduleWeekly;} + {_retentionDuration = If( json?.PropertyT("retentionDuration"), out var __jsonRetentionDuration) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RetentionDuration.FromJson(__jsonRetentionDuration) : RetentionDuration;} + {_retentionScheduleFormatType = If( json?.PropertyT("retentionScheduleFormatType"), out var __jsonRetentionScheduleFormatType) ? (string)__jsonRetentionScheduleFormatType : (string)RetentionScheduleFormatType;} + {_monthsOfYear = If( json?.PropertyT("monthsOfYear"), out var __jsonMonthsOfYear) ? If( __jsonMonthsOfYear as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear) (__u is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear)""))) ))() : null : MonthsOfYear;} + {_retentionTime = If( json?.PropertyT("retentionTimes"), out var __jsonRetentionTimes) ? If( __jsonRetentionTimes as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(global::System.DateTime) (__p is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString __o ? global::System.DateTime.TryParse((string)__o, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __oValue) ? __oValue : default(global::System.DateTime) : default(global::System.DateTime))) ))() : null : RetentionTime;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/FetchTieringCostPostAcceptedResponseHeaders.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/FetchTieringCostPostAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..534d9bc3dfb4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/FetchTieringCostPostAcceptedResponseHeaders.cs @@ -0,0 +1,57 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class FetchTieringCostPostAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IFetchTieringCostPostAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IFetchTieringCostPostAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public FetchTieringCostPostAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IFetchTieringCostPostAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IFetchTieringCostPostAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IFetchTieringCostPostAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/FetchTieringCostPostAcceptedResponseHeaders.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/FetchTieringCostPostAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..d7c17552a33e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/FetchTieringCostPostAcceptedResponseHeaders.json.cs @@ -0,0 +1,107 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class FetchTieringCostPostAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal FetchTieringCostPostAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IFetchTieringCostPostAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IFetchTieringCostPostAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IFetchTieringCostPostAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new FetchTieringCostPostAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/RecoveryServicesBackupIdentity.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/RecoveryServicesBackupIdentity.cs new file mode 100644 index 000000000000..6487ae14a778 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/RecoveryServicesBackupIdentity.cs @@ -0,0 +1,299 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class RecoveryServicesBackupIdentity : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IRecoveryServicesBackupIdentity, + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IRecoveryServicesBackupIdentityInternal + { + + /// Backing field for property. + private string _azureRegion; + + /// Azure region to hit Api + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string AzureRegion { get => this._azureRegion; set => this._azureRegion = value; } + + /// Backing field for property. + private string _backupEngineName; + + /// Name of the backup management server. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string BackupEngineName { get => this._backupEngineName; set => this._backupEngineName = value; } + + /// Backing field for property. + private string _containerName; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ContainerName { get => this._containerName; set => this._containerName = value; } + + /// Backing field for property. + private string _fabricName; + + /// Fabric name associated with the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string FabricName { get => this._fabricName; set => this._fabricName = value; } + + /// Backing field for property. + private string _id; + + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _intentObjectName; + + /// Backed up item name whose details are to be fetched. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string IntentObjectName { get => this._intentObjectName; set => this._intentObjectName = value; } + + /// Backing field for property. + private string _jobName; + + /// Name of the job whose details are to be fetched. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _operationId; + + /// Operation id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string OperationId { get => this._operationId; set => this._operationId = value; } + + /// Backing field for property. + private string _policyName; + + /// Backup policy information to be fetched. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PolicyName { get => this._policyName; set => this._policyName = value; } + + /// Backing field for property. + private string _privateEndpointConnectionName; + + /// The name of the private endpoint connection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string PrivateEndpointConnectionName { get => this._privateEndpointConnectionName; set => this._privateEndpointConnectionName = value; } + + /// Backing field for property. + private string _protectedItemName; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ProtectedItemName { get => this._protectedItemName; set => this._protectedItemName = value; } + + /// Backing field for property. + private string _recoveryPointId; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string RecoveryPointId { get => this._recoveryPointId; set => this._recoveryPointId = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group where the recovery services vault is present. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _resourceGuardProxyName; + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string ResourceGuardProxyName { get => this._resourceGuardProxyName; set => this._resourceGuardProxyName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The subscription Id. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _vaultName; + + /// The name of the recovery services vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)] + public string VaultName { get => this._vaultName; set => this._vaultName = value; } + + /// Creates an new instance. + public RecoveryServicesBackupIdentity() + { + + } + } + public partial interface IRecoveryServicesBackupIdentity : + Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable + { + /// Azure region to hit Api + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Azure region to hit Api", + SerializedName = @"azureRegion", + PossibleTypes = new [] { typeof(string) })] + string AzureRegion { get; set; } + /// Name of the backup management server. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the backup management server.", + SerializedName = @"backupEngineName", + PossibleTypes = new [] { typeof(string) })] + string BackupEngineName { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"containerName", + PossibleTypes = new [] { typeof(string) })] + string ContainerName { get; set; } + /// Fabric name associated with the backed up item. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fabric name associated with the backed up item.", + SerializedName = @"fabricName", + PossibleTypes = new [] { typeof(string) })] + string FabricName { get; set; } + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource identity path", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// Backed up item name whose details are to be fetched. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backed up item name whose details are to be fetched.", + SerializedName = @"intentObjectName", + PossibleTypes = new [] { typeof(string) })] + string IntentObjectName { get; set; } + /// Name of the job whose details are to be fetched. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the job whose details are to be fetched.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + string JobName { get; set; } + /// Operation id + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operation id", + SerializedName = @"operationId", + PossibleTypes = new [] { typeof(string) })] + string OperationId { get; set; } + /// Backup policy information to be fetched. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Backup policy information to be fetched.", + SerializedName = @"policyName", + PossibleTypes = new [] { typeof(string) })] + string PolicyName { get; set; } + /// The name of the private endpoint connection. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the private endpoint connection.", + SerializedName = @"privateEndpointConnectionName", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointConnectionName { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"protectedItemName", + PossibleTypes = new [] { typeof(string) })] + string ProtectedItemName { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"recoveryPointId", + PossibleTypes = new [] { typeof(string) })] + string RecoveryPointId { get; set; } + /// The name of the resource group where the recovery services vault is present. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the resource group where the recovery services vault is present.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroupName { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"resourceGuardProxyName", + PossibleTypes = new [] { typeof(string) })] + string ResourceGuardProxyName { get; set; } + /// The subscription Id. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The subscription Id.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + /// The name of the recovery services vault. + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the recovery services vault.", + SerializedName = @"vaultName", + PossibleTypes = new [] { typeof(string) })] + string VaultName { get; set; } + + } + internal partial interface IRecoveryServicesBackupIdentityInternal + + { + /// Azure region to hit Api + string AzureRegion { get; set; } + /// Name of the backup management server. + string BackupEngineName { get; set; } + + string ContainerName { get; set; } + /// Fabric name associated with the backed up item. + string FabricName { get; set; } + /// Resource identity path + string Id { get; set; } + /// Backed up item name whose details are to be fetched. + string IntentObjectName { get; set; } + /// Name of the job whose details are to be fetched. + string JobName { get; set; } + /// Operation id + string OperationId { get; set; } + /// Backup policy information to be fetched. + string PolicyName { get; set; } + /// The name of the private endpoint connection. + string PrivateEndpointConnectionName { get; set; } + + string ProtectedItemName { get; set; } + + string RecoveryPointId { get; set; } + /// The name of the resource group where the recovery services vault is present. + string ResourceGroupName { get; set; } + + string ResourceGuardProxyName { get; set; } + /// The subscription Id. + string SubscriptionId { get; set; } + /// The name of the recovery services vault. + string VaultName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/RecoveryServicesBackupIdentity.json.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/RecoveryServicesBackupIdentity.json.cs new file mode 100644 index 000000000000..c4a6b8936373 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Models/RecoveryServicesBackupIdentity.json.cs @@ -0,0 +1,137 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public partial class RecoveryServicesBackupIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IRecoveryServicesBackupIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IRecoveryServicesBackupIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IRecoveryServicesBackupIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new RecoveryServicesBackupIdentity(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from. + internal RecoveryServicesBackupIdentity(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_vaultName = If( json?.PropertyT("vaultName"), out var __jsonVaultName) ? (string)__jsonVaultName : (string)VaultName;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_azureRegion = If( json?.PropertyT("azureRegion"), out var __jsonAzureRegion) ? (string)__jsonAzureRegion : (string)AzureRegion;} + {_fabricName = If( json?.PropertyT("fabricName"), out var __jsonFabricName) ? (string)__jsonFabricName : (string)FabricName;} + {_intentObjectName = If( json?.PropertyT("intentObjectName"), out var __jsonIntentObjectName) ? (string)__jsonIntentObjectName : (string)IntentObjectName;} + {_privateEndpointConnectionName = If( json?.PropertyT("privateEndpointConnectionName"), out var __jsonPrivateEndpointConnectionName) ? (string)__jsonPrivateEndpointConnectionName : (string)PrivateEndpointConnectionName;} + {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)OperationId;} + {_containerName = If( json?.PropertyT("containerName"), out var __jsonContainerName) ? (string)__jsonContainerName : (string)ContainerName;} + {_protectedItemName = If( json?.PropertyT("protectedItemName"), out var __jsonProtectedItemName) ? (string)__jsonProtectedItemName : (string)ProtectedItemName;} + {_recoveryPointId = If( json?.PropertyT("recoveryPointId"), out var __jsonRecoveryPointId) ? (string)__jsonRecoveryPointId : (string)RecoveryPointId;} + {_policyName = If( json?.PropertyT("policyName"), out var __jsonPolicyName) ? (string)__jsonPolicyName : (string)PolicyName;} + {_jobName = If( json?.PropertyT("jobName"), out var __jsonJobName) ? (string)__jsonJobName : (string)JobName;} + {_backupEngineName = If( json?.PropertyT("backupEngineName"), out var __jsonBackupEngineName) ? (string)__jsonBackupEngineName : (string)BackupEngineName;} + {_resourceGuardProxyName = If( json?.PropertyT("resourceGuardProxyName"), out var __jsonResourceGuardProxyName) ? (string)__jsonResourceGuardProxyName : (string)ResourceGuardProxyName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + 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) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._vaultName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._vaultName.ToString()) : null, "vaultName" ,container.Add ); + AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._azureRegion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._azureRegion.ToString()) : null, "azureRegion" ,container.Add ); + AddIf( null != (((object)this._fabricName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._fabricName.ToString()) : null, "fabricName" ,container.Add ); + AddIf( null != (((object)this._intentObjectName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._intentObjectName.ToString()) : null, "intentObjectName" ,container.Add ); + AddIf( null != (((object)this._privateEndpointConnectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._privateEndpointConnectionName.ToString()) : null, "privateEndpointConnectionName" ,container.Add ); + AddIf( null != (((object)this._operationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._operationId.ToString()) : null, "operationId" ,container.Add ); + AddIf( null != (((object)this._containerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._containerName.ToString()) : null, "containerName" ,container.Add ); + AddIf( null != (((object)this._protectedItemName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._protectedItemName.ToString()) : null, "protectedItemName" ,container.Add ); + AddIf( null != (((object)this._recoveryPointId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._recoveryPointId.ToString()) : null, "recoveryPointId" ,container.Add ); + AddIf( null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName" ,container.Add ); + AddIf( null != (((object)this._jobName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._jobName.ToString()) : null, "jobName" ,container.Add ); + AddIf( null != (((object)this._backupEngineName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._backupEngineName.ToString()) : null, "backupEngineName" ,container.Add ); + AddIf( null != (((object)this._resourceGuardProxyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._resourceGuardProxyName.ToString()) : null, "resourceGuardProxyName" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/RecoveryServicesBackupClient.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/RecoveryServicesBackupClient.cs new file mode 100644 index 000000000000..d384ab7f42fe --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/RecoveryServicesBackupClient.cs @@ -0,0 +1,16105 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup +{ + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + /// + /// Low-level API implementation for the Recovery Services Backup Client service. + /// Open API 2.0 Specs for Azure RecoveryServices Backup service + /// + public partial class RecoveryServicesBackupClient + { + + /// Returns backup management server registered to Recovery Services Vault. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the backup management server. + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupEnginesGet(string vaultName, string resourceGroupName, string subscriptionId, string backupEngineName, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupEngines/" + + global::System.Uri.EscapeDataString(backupEngineName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupEnginesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Returns backup management server registered to Recovery Services Vault. + /// + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupEnginesGetViaIdentity(global::System.String viaIdentity, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupEngines/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var backupEngineName = _match.Groups["backupEngineName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupEngines/" + + backupEngineName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupEnginesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupEnginesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBaseResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the backup management server. + /// OData filter options. + /// skipToken Filter. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupEnginesGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string backupEngineName, string Filter, string SkipToken, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(backupEngineName),backupEngineName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(SkipToken),SkipToken); + } + } + + /// + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupEnginesList(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupEngines" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupEnginesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + /// + /// + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupEnginesListViaIdentity(global::System.String viaIdentity, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupEngines$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupEngines" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupEnginesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupEnginesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupEngineBaseResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupEnginesList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(SkipToken),SkipToken); + } + } + + /// Provides a pageable list of jobs. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupJobsList(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupJobs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupJobsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Provides a pageable list of jobs. + /// + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupJobsListViaIdentity(global::System.String viaIdentity, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupJobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupJobs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupJobsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupJobsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.JobResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupJobsList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(SkipToken),SkipToken); + } + } + + /// + /// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the + /// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On + /// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is + /// part of the Location header of the operation response. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID which represents the operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupOperationResultsGet(string vaultName, string resourceGroupName, string subscriptionId, string operationId, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupOperationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupOperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the + /// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On + /// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is + /// part of the Location header of the operation response. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupOperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupOperationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupOperationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupOperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupOperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID which represents the operation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupOperationResultsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs when the operation is complete. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID which represents the operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupOperationStatusesGet(string vaultName, string resourceGroupName, string subscriptionId, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupOperations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs when the operation is complete. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupOperationStatusesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupOperations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupOperations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupOperationStatusesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID which represents the operation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupOperationStatusesGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch + /// scoped results. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupPoliciesList(string vaultName, string resourceGroupName, string subscriptionId, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupPolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupPoliciesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch + /// scoped results. + /// + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupPoliciesListViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupPolicies$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupPolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupPoliciesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupPoliciesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicyResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupPoliciesList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string Filter, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the + /// pagination parameters. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupProtectableItemsList(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupProtectableItems" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupProtectableItemsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the + /// pagination parameters. + /// + /// + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupProtectableItemsListViaIdentity(global::System.String viaIdentity, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupProtectableItems$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupProtectableItems" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupProtectableItemsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupProtectableItemsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadProtectableItemResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupProtectableItemsList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(SkipToken),SkipToken); + } + } + + /// Provides a pageable list of all items that are backed up within a vault. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupProtectedItemsList(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupProtectedItems" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupProtectedItemsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupProtectedItemsListViaIdentity(global::System.String viaIdentity, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupProtectedItems$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupProtectedItems" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupProtectedItemsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupProtectedItemsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItemResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupProtectedItemsList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(SkipToken),SkipToken); + } + } + + /// Lists the containers registered to Recovery Services Vault. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupProtectionContainersList(string vaultName, string resourceGroupName, string subscriptionId, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupProtectionContainers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupProtectionContainersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the containers registered to Recovery Services Vault. + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupProtectionContainersListViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupProtectionContainers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupProtectionContainers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupProtectionContainersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupProtectionContainersList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainerResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupProtectionContainersList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string Filter, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// Provides a pageable list of all intents that are present within a vault. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupProtectionIntentList(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupProtectionIntents" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupProtectionIntentList_Call(request,onOk,eventListener,sender); + } + } + + /// Provides a pageable list of all intents that are present within a vault. + /// + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupProtectionIntentListViaIdentity(global::System.String viaIdentity, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupProtectionIntents$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupProtectionIntents" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupProtectionIntentList_Call(request,onOk,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupProtectionIntentList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntentResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupProtectionIntentList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(SkipToken),SkipToken); + } + } + + /// Fetches Vault Encryption config. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceEncryptionConfigsGet(string vaultName, string resourceGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupEncryptionConfigs/backupResourceEncryptionConfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceEncryptionConfigsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Fetches Vault Encryption config. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceEncryptionConfigsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupEncryptionConfigs/backupResourceEncryptionConfig$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupEncryptionConfigs/backupResourceEncryptionConfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceEncryptionConfigsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceEncryptionConfigsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceEncryptionConfigExtendedResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceEncryptionConfigsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates Vault encryption config. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Vault encryption input config request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceEncryptionConfigsUpdate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigResource body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupEncryptionConfigs/backupResourceEncryptionConfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceEncryptionConfigsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates Vault encryption config. + /// + /// Vault encryption input config request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceEncryptionConfigsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigResource body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupEncryptionConfigs/backupResourceEncryptionConfig$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupEncryptionConfigs/backupResourceEncryptionConfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceEncryptionConfigsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceEncryptionConfigsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Vault encryption input config request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceEncryptionConfigsUpdate_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceEncryptionConfigResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Fetches resource storage config. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrGet(string vaultName, string resourceGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupstorageconfig/vaultstorageconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceStorageConfigsNonCrrGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Fetches resource storage config. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupstorageconfig/vaultstorageconfig$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupstorageconfig/vaultstorageconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceStorageConfigsNonCrrGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceConfigResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates vault storage model type. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Vault storage config request + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrPatch(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource body, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupstorageconfig/vaultstorageconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceStorageConfigsNonCrrPatch_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Updates vault storage model type. + /// + /// Vault storage config request + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrPatchViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource body, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupstorageconfig/vaultstorageconfig$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupstorageconfig/vaultstorageconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceStorageConfigsNonCrrPatch_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrPatch_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Vault storage config request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrPatch_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Updates vault storage model type. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Vault storage config request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrUpdate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupstorageconfig/vaultstorageconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceStorageConfigsNonCrrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates vault storage model type. + /// + /// Vault storage config request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupstorageconfig/vaultstorageconfig$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupstorageconfig/vaultstorageconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceStorageConfigsNonCrrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceConfigResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Vault storage config request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceStorageConfigsNonCrrUpdate_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceConfigResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Fetches resource vault config. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceVaultConfigsGet(string vaultName, string resourceGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupconfig/vaultconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceVaultConfigsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Fetches resource vault config. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceVaultConfigsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupconfig/vaultconfig$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupconfig/vaultconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceVaultConfigsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceVaultConfigsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceVaultConfigResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceVaultConfigsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates vault security config. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// resource config request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceVaultConfigsPut(string vaultName, string resourceGroupName, string subscriptionId, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupconfig/vaultconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceVaultConfigsPut_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates vault security config. + /// + /// + /// resource config request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceVaultConfigsPutViaIdentity(global::System.String viaIdentity, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupconfig/vaultconfig$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupconfig/vaultconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceVaultConfigsPut_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceVaultConfigsPut_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceVaultConfigResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// resource config request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceVaultConfigsPut_Validate(string vaultName, string resourceGroupName, string subscriptionId, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(xMSAuthorizationAuxiliary),xMSAuthorizationAuxiliary); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Updates vault security config. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// resource config request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceVaultConfigsUpdate(string vaultName, string resourceGroupName, string subscriptionId, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupconfig/vaultconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceVaultConfigsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates vault security config. + /// + /// + /// resource config request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupResourceVaultConfigsUpdateViaIdentity(global::System.String viaIdentity, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupconfig/vaultconfig$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupconfig/vaultconfig" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupResourceVaultConfigsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceVaultConfigsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupResourceVaultConfigResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// resource config request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupResourceVaultConfigsUpdate_Validate(string vaultName, string resourceGroupName, string subscriptionId, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupResourceVaultConfigResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(xMSAuthorizationAuxiliary),xMSAuthorizationAuxiliary); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get the container backup status + /// Azure region to hit Api + /// The subscription Id. + /// Container Backup Status Request + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupStatusGet(string azureRegion, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.RecoveryServices/locations/" + + global::System.Uri.EscapeDataString(azureRegion) + + "/backupStatus" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupStatusGet_Call(request,onOk,eventListener,sender); + } + } + + /// Get the container backup status + /// + /// Container Backup Status Request + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupStatusGetViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/providers/Microsoft.RecoveryServices/locations/(?[^/]+)/backupStatus$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus'"); + } + + // replace URI parameters with values from identity + var azureRegion = _match.Groups["azureRegion"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/providers/Microsoft.RecoveryServices/locations/" + + azureRegion + + "/backupStatus" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupStatusGet_Call(request,onOk,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupStatusGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupStatusResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Azure region to hit Api + /// The subscription Id. + /// Container Backup Status Request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupStatusGet_Validate(string azureRegion, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupStatusRequest body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(azureRegion),azureRegion); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Fetches the backup management usage summaries of the vault. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupUsageSummariesList(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupUsageSummaries" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupUsageSummariesList_Call(request,onOk,eventListener,sender); + } + } + + /// Fetches the backup management usage summaries of the vault. + /// + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupUsageSummariesListViaIdentity(global::System.String viaIdentity, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupUsageSummaries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupUsageSummaries" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupUsageSummariesList_Call(request,onOk,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupUsageSummariesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.BackupManagementUsageList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// skipToken Filter. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupUsageSummariesList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string Filter, string SkipToken, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(SkipToken),SkipToken); + } + } + + /// + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination + /// parameters. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the container. + /// Name of the container. + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupWorkloadItemsList(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/items" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupWorkloadItemsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination + /// parameters. + /// + /// + /// OData filter options. + /// skipToken Filter. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupWorkloadItemsListViaIdentity(global::System.String viaIdentity, string Filter, string SkipToken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/items$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/items" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(SkipToken) ? global::System.String.Empty : "$skipToken=" + global::System.Uri.EscapeDataString(SkipToken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupWorkloadItemsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupWorkloadItemsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.WorkloadItemResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the container. + /// Name of the container. + /// OData filter options. + /// skipToken Filter. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupWorkloadItemsList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string Filter, string SkipToken, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(SkipToken),SkipToken); + } + } + + /// + /// Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the + /// operation, call GetProtectedItemOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Container name associated with the backup item. + /// Backup item for which backup needs to be triggered. + /// resource backup request + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupsTrigger(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestResource body, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/backup" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupsTrigger_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the + /// operation, call GetProtectedItemOperationResult API. + /// + /// + /// resource backup request + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BackupsTriggerViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestResource body, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/backup$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/backup" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BackupsTrigger_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupsTrigger_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Container name associated with the backup item. + /// Backup item for which backup needs to be triggered. + /// resource backup request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BackupsTrigger_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IBackupRequestResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Fetches Operation Result for Prepare Data Move + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BmsPrepareDataMoveOperationResultGet(string vaultName, string resourceGroupName, string subscriptionId, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupstorageconfig/vaultstorageconfig/operationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BmsPrepareDataMoveOperationResultGet_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Fetches Operation Result for Prepare Data Move + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BmsPrepareDataMoveOperationResultGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupstorageconfig/vaultstorageconfig/operationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupstorageconfig/vaultstorageconfig/operationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BmsPrepareDataMoveOperationResultGet_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BmsPrepareDataMoveOperationResultGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.VaultStorageConfigOperationResultResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BmsPrepareDataMoveOperationResultGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// Prepares source vault for Data Move operation + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Prepare data move request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BmsprepareDataMove(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveRequest body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupstorageconfig/vaultstorageconfig/prepareDataMove" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BmsprepareDataMove_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Prepares source vault for Data Move operation + /// + /// Prepare data move request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BmsprepareDataMoveViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveRequest body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupstorageconfig/vaultstorageconfig/prepareDataMove$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupstorageconfig/vaultstorageconfig/prepareDataMove" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BmsprepareDataMove_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BmsprepareDataMove_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Prepare data move request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BmsprepareDataMove_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrepareDataMoveRequest body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Triggers Data Move Operation on target vault + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Trigger data move request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BmstriggerDataMove(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITriggerDataMoveRequest body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupstorageconfig/vaultstorageconfig/triggerDataMove" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BmstriggerDataMove_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Triggers Data Move Operation on target vault + /// + /// Trigger data move request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task BmstriggerDataMoveViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITriggerDataMoveRequest body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupstorageconfig/vaultstorageconfig/triggerDataMove$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupstorageconfig/vaultstorageconfig/triggerDataMove" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.BmstriggerDataMove_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BmstriggerDataMove_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Trigger data move request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task BmstriggerDataMove_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ITriggerDataMoveRequest body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Lists the soft deleted containers registered to Recovery Services Vault. + /// The subscription Id. + /// The name of the resource group where the recovery services vault is present. + /// The name of the recovery services vault. + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeletedProtectionContainersList(string subscriptionId, string resourceGroupName, string vaultName, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupDeletedProtectionContainers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeletedProtectionContainersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the soft deleted containers registered to Recovery Services Vault. + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DeletedProtectionContainersListViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupDeletedProtectionContainers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupDeletedProtectionContainers'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var vaultName = _match.Groups["vaultName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupDeletedProtectionContainers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DeletedProtectionContainersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeletedProtectionContainersList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainerResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The subscription Id. + /// The name of the resource group where the recovery services vault is present. + /// The name of the recovery services vault. + /// OData filter options. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DeletedProtectionContainersList_Validate(string subscriptionId, string resourceGroupName, string vaultName, string Filter, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// + /// Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also + /// contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID which represents the export job. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExportJobsOperationResultsGet(string vaultName, string resourceGroupName, string subscriptionId, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupJobs/operationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExportJobsOperationResultsGet_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also + /// contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExportJobsOperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupJobs/operationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupJobs/operationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExportJobsOperationResultsGet_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExportJobsOperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationResultInfoBaseResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationResultInfoBaseResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID which represents the export job. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExportJobsOperationResultsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// It will validate if given feature with resource properties is supported in service + /// + /// Azure region to hit Api + /// The subscription Id. + /// Feature support request object + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FeatureSupportValidate(string azureRegion, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.RecoveryServices/locations/" + + global::System.Uri.EscapeDataString(azureRegion) + + "/backupValidateFeatures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FeatureSupportValidate_Call(request,onOk,eventListener,sender); + } + } + + /// + /// It will validate if given feature with resource properties is supported in service + /// + /// + /// Feature support request object + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FeatureSupportValidateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/providers/Microsoft.RecoveryServices/locations/(?[^/]+)/backupValidateFeatures$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures'"); + } + + // replace URI parameters with values from identity + var azureRegion = _match.Groups["azureRegion"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/providers/Microsoft.RecoveryServices/locations/" + + azureRegion + + "/backupValidateFeatures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FeatureSupportValidate_Call(request,onOk,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FeatureSupportValidate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.AzureVMResourceFeatureSupportResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Azure region to hit Api + /// The subscription Id. + /// Feature support request object + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FeatureSupportValidate_Validate(string azureRegion, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFeatureSupportRequest body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(azureRegion),azureRegion); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Provides the details of the tiering related sizes and cost. + /// Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult + /// API. + /// + /// The subscription Id. + /// The name of the resource group where the recovery services vault is present. + /// The name of the recovery services vault. + /// Fetch Tiering Cost Request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FetchTieringCostPost(string subscriptionId, string resourceGroupName, string vaultName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupTieringCost/default/fetchTieringCost" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FetchTieringCostPost_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Provides the details of the tiering related sizes and cost. + /// Status of the operation can be fetched using GetTieringCostOperationStatus API and result using GetTieringCostOperationResult + /// API. + /// + /// + /// Fetch Tiering Cost Request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FetchTieringCostPostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupTieringCost/default/fetchTieringCost$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/fetchTieringCost'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var vaultName = _match.Groups["vaultName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupTieringCost/default/fetchTieringCost" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FetchTieringCostPost_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FetchTieringCostPost_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TieringCostInfo.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The subscription Id. + /// The name of the resource group where the recovery services vault is present. + /// The name of the recovery services vault. + /// Fetch Tiering Cost Request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FetchTieringCostPost_Validate(string subscriptionId, string resourceGroupName, string vaultName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IFetchTieringCostInfoRequest body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertMinimumLength(nameof(vaultName),vaultName,2); + await eventListener.AssertMaximumLength(nameof(vaultName),vaultName,50); + await eventListener.AssertRegEx(nameof(vaultName),vaultName,@"^[A-Za-z][-A-Za-z0-9]*[A-Za-z0-9]$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Fetches operation status for data move operation on vault + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GetOperationStatus(string vaultName, string resourceGroupName, string subscriptionId, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupstorageconfig/vaultstorageconfig/operationStatus/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GetOperationStatus_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Fetches operation status for data move operation on vault + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GetOperationStatusViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupstorageconfig/vaultstorageconfig/operationStatus/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupstorageconfig/vaultstorageconfig/operationStatus/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GetOperationStatus_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GetOperationStatus_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GetOperationStatus_Validate(string vaultName, string resourceGroupName, string subscriptionId, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// Gets the result of async operation for tiering cost + /// The subscription Id. + /// The name of the resource group where the recovery services vault is present. + /// The name of the recovery services vault. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GetTieringCostOperationResultGet(string subscriptionId, string resourceGroupName, string vaultName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupTieringCost/default/operationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GetTieringCostOperationResultGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets the result of async operation for tiering cost + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GetTieringCostOperationResultGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupTieringCost/default/operationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/operationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var vaultName = _match.Groups["vaultName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupTieringCost/default/operationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GetTieringCostOperationResultGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GetTieringCostOperationResultGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TieringCostInfo.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The subscription Id. + /// The name of the resource group where the recovery services vault is present. + /// The name of the recovery services vault. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GetTieringCostOperationResultGet_Validate(string subscriptionId, string resourceGroupName, string vaultName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertMinimumLength(nameof(vaultName),vaultName,2); + await eventListener.AssertMaximumLength(nameof(vaultName),vaultName,50); + await eventListener.AssertRegEx(nameof(vaultName),vaultName,@"^[A-Za-z][-A-Za-z0-9]*[A-Za-z0-9]$"); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file + /// explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of + /// provisioning, call GetProtectedItemOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up items. + /// Container name associated with the backed up items. + /// Backed up item name whose files/folders are to be restored. + /// Recovery point ID which represents backed up data. iSCSI connection will be provisioned + /// for this backed up data. + /// resource ILR request + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ItemLevelRecoveryConnectionsProvision(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestResource body, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/recoveryPoints/" + + global::System.Uri.EscapeDataString(recoveryPointId) + + "/provisionInstantItemRecovery" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ItemLevelRecoveryConnectionsProvision_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file + /// explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of + /// provisioning, call GetProtectedItemOperationResult API. + /// + /// + /// resource ILR request + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ItemLevelRecoveryConnectionsProvisionViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestResource body, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/recoveryPoints/(?[^/]+)/provisionInstantItemRecovery$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + var recoveryPointId = _match.Groups["recoveryPointId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/recoveryPoints/" + + recoveryPointId + + "/provisionInstantItemRecovery" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ItemLevelRecoveryConnectionsProvision_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ItemLevelRecoveryConnectionsProvision_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up items. + /// Container name associated with the backed up items. + /// Backed up item name whose files/folders are to be restored. + /// Recovery point ID which represents backed up data. iSCSI connection will be provisioned + /// for this backed up data. + /// resource ILR request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ItemLevelRecoveryConnectionsProvision_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IIlrRequestResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(recoveryPointId),recoveryPointId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer + /// displaying all recoverable files and folders. This is an asynchronous operation. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up items. + /// Container name associated with the backed up items. + /// Backed up item name whose files/folders are to be restored. + /// Recovery point ID which represents backed up data. iSCSI connection will be revoked for + /// this backed up data. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ItemLevelRecoveryConnectionsRevoke(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/recoveryPoints/" + + global::System.Uri.EscapeDataString(recoveryPointId) + + "/revokeInstantItemRecovery" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ItemLevelRecoveryConnectionsRevoke_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer + /// displaying all recoverable files and folders. This is an asynchronous operation. + /// + /// + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ItemLevelRecoveryConnectionsRevokeViaIdentity(global::System.String viaIdentity, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/recoveryPoints/(?[^/]+)/revokeInstantItemRecovery$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + var recoveryPointId = _match.Groups["recoveryPointId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/recoveryPoints/" + + recoveryPointId + + "/revokeInstantItemRecovery" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ItemLevelRecoveryConnectionsRevoke_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ItemLevelRecoveryConnectionsRevoke_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up items. + /// Container name associated with the backed up items. + /// Backed up item name whose files/folders are to be restored. + /// Recovery point ID which represents backed up data. iSCSI connection will be revoked for + /// this backed up data. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ItemLevelRecoveryConnectionsRevoke_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(recoveryPointId),recoveryPointId); + } + } + + /// + /// Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call + /// GetCancelOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the job to cancel. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobCancellationsTrigger(string vaultName, string resourceGroupName, string subscriptionId, string jobName, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupJobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/cancel" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobCancellationsTrigger_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call + /// GetCancelOperationResult API. + /// + /// + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobCancellationsTriggerViaIdentity(global::System.String viaIdentity, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupJobs/(?[^/]+)/cancel$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupJobs/" + + jobName + + "/cancel" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobCancellationsTrigger_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobCancellationsTrigger_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the job to cancel. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobCancellationsTrigger_Validate(string vaultName, string resourceGroupName, string subscriptionId, string jobName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(jobName),jobName); + } + } + + /// Gets extended information associated with the job. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the job whose details are to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobDetailsGet(string vaultName, string resourceGroupName, string subscriptionId, string jobName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupJobs/" + + global::System.Uri.EscapeDataString(jobName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDetailsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets extended information associated with the job. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobDetailsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupJobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupJobs/" + + jobName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDetailsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobDetailsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.JobResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the job whose details are to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobDetailsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string jobName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(jobName),jobName); + } + } + + /// Fetches the result of any operation. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Job name whose operation result has to be fetched. + /// OperationID which represents the operation whose result has to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobOperationResultsGet(string vaultName, string resourceGroupName, string subscriptionId, string jobName, string operationId, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupJobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/operationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobOperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Fetches the result of any operation. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobOperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupJobs/(?[^/]+)/operationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var jobName = _match.Groups["jobName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupJobs/" + + jobName + + "/operationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobOperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobOperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Job name whose operation result has to be fetched. + /// OperationID which represents the operation whose result has to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobOperationResultsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string jobName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Triggers export of jobs specified by filters and returns an OperationID to track. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsExport(string vaultName, string resourceGroupName, string subscriptionId, string Filter, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupJobsExport" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsExport_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Triggers export of jobs specified by filters and returns an OperationID to track. + /// + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task JobsExportViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupJobsExport$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupJobsExport" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobsExport_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsExport_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OData filter options. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task JobsExport_Validate(string vaultName, string resourceGroupName, string subscriptionId, string Filter, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// Move recovery point from one datastore to another store. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// + /// + /// + /// Move Resource Across Tiers Request + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MoveRecoveryPoint(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMoveRpAcrossTiersRequest body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/recoveryPoints/" + + global::System.Uri.EscapeDataString(recoveryPointId) + + "/move" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MoveRecoveryPoint_Call(request,onDefault,eventListener,sender); + } + } + + /// Move recovery point from one datastore to another store. + /// + /// Move Resource Across Tiers Request + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task MoveRecoveryPointViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMoveRpAcrossTiersRequest body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/recoveryPoints/(?[^/]+)/move$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + var recoveryPointId = _match.Groups["recoveryPointId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/recoveryPoints/" + + recoveryPointId + + "/move" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.MoveRecoveryPoint_Call(request,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MoveRecoveryPoint_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// + /// + /// + /// Move Resource Across Tiers Request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task MoveRecoveryPoint_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IMoveRpAcrossTiersRequest body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(recoveryPointId),recoveryPointId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Validate operation for specified backed up item. This is a synchronous operation. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// resource validate operation request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationValidate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupValidateOperation" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationValidate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Validate operation for specified backed up item. This is a synchronous operation. + /// + /// + /// resource validate operation request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationValidateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupValidateOperation$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupValidateOperation" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationValidate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationValidate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// resource validate operation request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationValidate_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Returns the list of available operations. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.RecoveryServices/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,eventListener,sender); + } + } + + /// Returns the list of available operations. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.RecoveryServices/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.RecoveryServices/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.RecoveryServices/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ClientDiscoveryResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// Delete Private Endpoint requests. This call is made by Backup Admin. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// The name of the private endpoint connection. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionDelete(string vaultName, string resourceGroupName, string subscriptionId, string privateEndpointConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete Private Endpoint requests. This call is made by Backup Admin. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// The name of the private endpoint connection. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionDelete_Validate(string vaultName, string resourceGroupName, string subscriptionId, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + } + } + + /// Get Private Endpoint Connection. This call is made by Backup Admin. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// The name of the private endpoint connection. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionGet(string vaultName, string resourceGroupName, string subscriptionId, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get Private Endpoint Connection. This call is made by Backup Admin. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateEndpointConnectionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// The name of the private endpoint connection. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + } + } + + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// The name of the private endpoint connection. + /// Request body for operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionPut(string vaultName, string resourceGroupName, string subscriptionId, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionPut_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + /// + /// Request body for operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionPutViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionPut_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionPut_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PrivateEndpointConnectionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// The name of the private endpoint connection. + /// Request body for operation + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionPut_Validate(string vaultName, string resourceGroupName, string subscriptionId, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPrivateEndpointConnectionResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Gets the operation status for a private endpoint connection. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// The name of the private endpoint connection. + /// Operation id + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointGetOperationStatus(string vaultName, string resourceGroupName, string subscriptionId, string privateEndpointConnectionName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + + "/operationsStatus/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointGetOperationStatus_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets the operation status for a private endpoint connection. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task PrivateEndpointGetOperationStatusViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/privateEndpointConnections/(?[^/]+)/operationsStatus/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + + "/operationsStatus/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointGetOperationStatus_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointGetOperationStatus_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.NewErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// The name of the private endpoint connection. + /// Operation id + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task PrivateEndpointGetOperationStatus_Validate(string vaultName, string resourceGroupName, string subscriptionId, string privateEndpointConnectionName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(privateEndpointConnectionName),privateEndpointConnectionName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// Lists the containers that can be registered to Recovery Services Vault. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectableContainersList(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectableContainers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectableContainersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the containers that can be registered to Recovery Services Vault. + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectableContainersListViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectableContainers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectableContainers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectableContainersList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectableContainersList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectableContainerResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// OData filter options. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectableContainersList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string Filter, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// Fetches the result of any operation on the backup item. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Container name associated with the backup item. + /// Backup item name whose details are to be fetched. + /// OperationID which represents the operation whose result needs to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemOperationResultsGet(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/operationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemOperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Fetches the result of any operation on the backup item. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemOperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/operationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/operationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemOperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemOperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItemResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Container name associated with the backup item. + /// Backup item name whose details are to be fetched. + /// OperationID which represents the operation whose result needs to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemOperationResultsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations + /// create jobs. This method returns the list of jobs associated with the operation. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Container name associated with the backup item. + /// Backup item name whose details are to be fetched. + /// OperationID represents the operation whose status needs to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemOperationStatusesGet(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/operationsStatus/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations + /// create jobs. This method returns the list of jobs associated with the operation. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemOperationStatusesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/operationsStatus/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/operationsStatus/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemOperationStatusesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Container name associated with the backup item. + /// Backup item name whose details are to be fetched. + /// OperationID represents the operation whose status needs to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemOperationStatusesGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + /// asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Container name associated with the backup item. + /// Item name to be backed up. + /// + /// resource backed up item + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemsCreateOrUpdate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemsCreateOrUpdate_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + /// asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + /// + /// + /// + /// resource backed up item + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemsCreateOrUpdateViaIdentity(global::System.String viaIdentity, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemsCreateOrUpdate_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItemResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Container name associated with the backup item. + /// Item name to be backed up. + /// + /// resource backed up item + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemsCreateOrUpdate_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectedItemResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(xMSAuthorizationAuxiliary),xMSAuthorizationAuxiliary); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the + /// request, call the GetItemOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up item. + /// Container name associated with the backed up item. + /// Backed up item to be deleted. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemsDelete(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemsDelete_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the + /// request, call the GetItemOperationResult API. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemsDelete_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up item. + /// Container name associated with the backed up item. + /// Backed up item to be deleted. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemsDelete_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + } + } + + /// + /// Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up item. + /// Container name associated with the backed up item. + /// Backed up item name whose details are to be fetched. + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemsGet(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectedItemsGetViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectedItemsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectedItemResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up item. + /// Container name associated with the backed up item. + /// Backed up item name whose details are to be fetched. + /// OData filter options. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectedItemsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string Filter, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// Fetches the result of any operation on the container. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the container. + /// Container name whose information should be fetched. + /// Operation ID which represents the operation whose result needs to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainerOperationResultsGet(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/operationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainerOperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Fetches the result of any operation on the container. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainerOperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/operationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/operationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainerOperationResultsGet_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainerOperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainerResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the container. + /// Container name whose information should be fetched. + /// Operation ID which represents the operation whose result needs to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainerOperationResultsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Provides the result of the refresh operation triggered by the BeginRefresh operation. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the container. + /// Operation ID associated with the operation whose result needs to be fetched. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainerRefreshOperationResultsGet(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string operationId, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/operationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainerRefreshOperationResultsGet_Call(request,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Provides the result of the refresh operation triggered by the BeginRefresh operation. + /// + /// + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainerRefreshOperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/operationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/operationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainerRefreshOperationResultsGet_Call(request,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainerRefreshOperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the container. + /// Operation ID associated with the operation whose result needs to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainerRefreshOperationResultsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Gets details of the specific container registered to your Recovery Services Vault. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the fabric where the container belongs. + /// Name of the container whose details need to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersGet(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets details of the specific container registered to your Recovery Services Vault. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainerResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the fabric where the container belongs. + /// Name of the container whose details need to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + } + } + + /// + /// This is an async operation and the results should be tracked using location header or Azure-async-url. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric Name associated with the container. + /// Name of the container in which inquiry needs to be triggered. + /// OData filter options. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersInquire(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string Filter, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/inquire" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersInquire_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// This is an async operation and the results should be tracked using location header or Azure-async-url. + /// + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersInquireViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/inquire$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/inquire" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersInquire_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersInquire_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric Name associated with the container. + /// Name of the container in which inquiry needs to be triggered. + /// OData filter options. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersInquire_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string Filter, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// + /// Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an + /// asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated the container. + /// OData filter options. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersRefresh(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string Filter, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/refreshContainers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersRefresh_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an + /// asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. + /// + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersRefreshViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/refreshContainers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/refreshContainers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersRefresh_Call(request,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersRefresh_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated the container. + /// OData filter options. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersRefresh_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string Filter, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// + /// Registers the container with Recovery Services vault. + /// This is an asynchronous operation. To track the operation status, use location header to call get latest status of + /// the operation. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the container. + /// Name of the container to be registered. + /// Request body for operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersRegister(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersRegister_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Registers the container with Recovery Services vault. + /// This is an asynchronous operation. To track the operation status, use location header to call get latest status of + /// the operation. + /// + /// + /// Request body for operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersRegisterViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersRegister_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersRegister_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionContainerResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the container. + /// Name of the container to be registered. + /// Request body for operation + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersRegister_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionContainerResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine + /// whether the backend service has finished processing the request, call Get Container Operation Result API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the fabric where the container belongs. + /// Name of the container which needs to be unregistered from the Recovery Services Vault. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersUnregister(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersUnregister_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine + /// whether the backend service has finished processing the request, call Get Container Operation Result API. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionContainersUnregisterViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionContainersUnregister_Call(request,onOk,onAccepted,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersUnregister_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onAccepted, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Name of the fabric where the container belongs. + /// Name of the container which needs to be unregistered from the Recovery Services Vault. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionContainersUnregister_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + } + } + + /// Create Intent for Enabling backup of an item. This is a synchronous operation. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Intent object name. + /// resource backed up item + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionIntentCreateOrUpdate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string intentObjectName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/backupProtectionIntent/" + + global::System.Uri.EscapeDataString(intentObjectName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionIntentCreateOrUpdate_Call(request,onOk,eventListener,sender); + } + } + + /// Create Intent for Enabling backup of an item. This is a synchronous operation. + /// + /// resource backed up item + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionIntentCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/backupProtectionIntent/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var intentObjectName = _match.Groups["intentObjectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/backupProtectionIntent/" + + intentObjectName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionIntentCreateOrUpdate_Call(request,onOk,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionIntentCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntentResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backup item. + /// Intent object name. + /// resource backed up item + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionIntentCreateOrUpdate_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string intentObjectName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionIntentResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(intentObjectName),intentObjectName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Used to remove intent from an item + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the intent. + /// Intent to be deleted. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionIntentDelete(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string intentObjectName, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/backupProtectionIntent/" + + global::System.Uri.EscapeDataString(intentObjectName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionIntentDelete_Call(request,onNoContent,eventListener,sender); + } + } + + /// Used to remove intent from an item + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionIntentDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/backupProtectionIntent/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var intentObjectName = _match.Groups["intentObjectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/backupProtectionIntent/" + + intentObjectName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionIntentDelete_Call(request,onNoContent,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionIntentDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the intent. + /// Intent to be deleted. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionIntentDelete_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string intentObjectName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(intentObjectName),intentObjectName); + } + } + + /// + /// Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up item. + /// Backed up item name whose details are to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionIntentGet(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string intentObjectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/backupProtectionIntent/" + + global::System.Uri.EscapeDataString(intentObjectName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionIntentGet_Call(request,onOk,eventListener,sender); + } + } + + /// + /// Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionIntentGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/backupProtectionIntent/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var intentObjectName = _match.Groups["intentObjectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/backupProtectionIntent/" + + intentObjectName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionIntentGet_Call(request,onOk,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionIntentGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionIntentResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up item. + /// Backed up item name whose details are to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionIntentGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string intentObjectName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(intentObjectName),intentObjectName); + } + } + + /// + /// It will validate followings + /// 1. Vault capacity + /// 2. VM is already protected + /// 3. Any VM related configuration passed in properties. + /// + /// Azure region to hit Api + /// The subscription Id. + /// Enable backup validation request on Virtual Machine + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionIntentValidate(string azureRegion, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.RecoveryServices/locations/" + + global::System.Uri.EscapeDataString(azureRegion) + + "/backupPreValidateProtection" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionIntentValidate_Call(request,onOk,eventListener,sender); + } + } + + /// + /// It will validate followings + /// 1. Vault capacity + /// 2. VM is already protected + /// 3. Any VM related configuration passed in properties. + /// + /// + /// Enable backup validation request on Virtual Machine + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionIntentValidateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/Subscriptions/(?[^/]+)/providers/Microsoft.RecoveryServices/locations/(?[^/]+)/backupPreValidateProtection$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection'"); + } + + // replace URI parameters with values from identity + var azureRegion = _match.Groups["azureRegion"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/Subscriptions/" + + subscriptionId + + "/providers/Microsoft.RecoveryServices/locations/" + + azureRegion + + "/backupPreValidateProtection" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionIntentValidate_Call(request,onOk,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionIntentValidate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.PreValidateEnableBackupResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// Azure region to hit Api + /// The subscription Id. + /// Enable backup validation request on Virtual Machine + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionIntentValidate_Validate(string azureRegion, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IPreValidateEnableBackupRequest body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(azureRegion),azureRegion); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched + /// using GetPolicyOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy to be created. + /// + /// resource backup policy + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPoliciesCreateOrUpdate(string vaultName, string resourceGroupName, string subscriptionId, string policyName, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupPolicies/" + + global::System.Uri.EscapeDataString(policyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPoliciesCreateOrUpdate_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// + /// Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched + /// using GetPolicyOperationResult API. + /// + /// + /// + /// resource backup policy + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPoliciesCreateOrUpdateViaIdentity(global::System.String viaIdentity, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var policyName = _match.Groups["policyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupPolicies/" + + policyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPoliciesCreateOrUpdate_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPoliciesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicyResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy to be created. + /// + /// resource backup policy + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPoliciesCreateOrUpdate_Validate(string vaultName, string resourceGroupName, string subscriptionId, string policyName, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IProtectionPolicyResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(policyName),policyName); + await eventListener.AssertNotNull(nameof(xMSAuthorizationAuxiliary),xMSAuthorizationAuxiliary); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy to be deleted. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPoliciesDelete(string vaultName, string resourceGroupName, string subscriptionId, string policyName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupPolicies/" + + global::System.Uri.EscapeDataString(policyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPoliciesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var policyName = _match.Groups["policyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupPolicies/" + + policyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPoliciesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy to be deleted. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPoliciesDelete_Validate(string vaultName, string resourceGroupName, string subscriptionId, string policyName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(policyName),policyName); + } + } + + /// + /// Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous + /// operation. Status of the operation can be fetched using GetPolicyOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy information to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPoliciesGet(string vaultName, string resourceGroupName, string subscriptionId, string policyName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupPolicies/" + + global::System.Uri.EscapeDataString(policyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous + /// operation. Status of the operation can be fetched using GetPolicyOperationResult API. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPoliciesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var policyName = _match.Groups["policyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupPolicies/" + + policyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPoliciesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicyResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy information to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPoliciesGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string policyName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(policyName),policyName); + } + } + + /// Provides the result of an operation. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy name whose operation's result needs to be fetched. + /// Operation ID which represents the operation whose result needs to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPolicyOperationResultsGet(string vaultName, string resourceGroupName, string subscriptionId, string policyName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupPolicies/" + + global::System.Uri.EscapeDataString(policyName) + + "/operationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPolicyOperationResultsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Provides the result of an operation. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPolicyOperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupPolicies/(?[^/]+)/operationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var policyName = _match.Groups["policyName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupPolicies/" + + policyName + + "/operationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPolicyOperationResultsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPolicyOperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ProtectionPolicyResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy name whose operation's result needs to be fetched. + /// Operation ID which represents the operation whose result needs to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPolicyOperationResultsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string policyName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(policyName),policyName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed + /// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs associated with operation. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy name whose operation's status needs to be fetched. + /// Operation ID which represents an operation whose status needs to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPolicyOperationStatusesGet(string vaultName, string resourceGroupName, string subscriptionId, string policyName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupPolicies/" + + global::System.Uri.EscapeDataString(policyName) + + "/operations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPolicyOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed + /// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs associated with operation. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProtectionPolicyOperationStatusesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupPolicies/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var policyName = _match.Groups["policyName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupPolicies/" + + policyName + + "/operations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProtectionPolicyOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPolicyOperationStatusesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Backup policy name whose operation's status needs to be fetched. + /// Operation ID which represents an operation whose status needs to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProtectionPolicyOperationStatusesGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string policyName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(policyName),policyName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. + /// To know the status of the operation, call the GetProtectedItemOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with backed up item. + /// Container name associated with backed up item. + /// Backed up item name whose backup data needs to be fetched. + /// RecoveryPointID represents the backed up data to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RecoveryPointsGet(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/recoveryPoints/" + + global::System.Uri.EscapeDataString(recoveryPointId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RecoveryPointsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. + /// To know the status of the operation, call the GetProtectedItemOperationResult API. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RecoveryPointsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/recoveryPoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + var recoveryPointId = _match.Groups["recoveryPointId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/recoveryPoints/" + + recoveryPointId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RecoveryPointsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RecoveryPointsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with backed up item. + /// Container name associated with backed up item. + /// Backed up item name whose backup data needs to be fetched. + /// RecoveryPointID represents the backed up data to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RecoveryPointsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(recoveryPointId),recoveryPointId); + } + } + + /// Lists the backup copies for the backed up item. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up item. + /// Container name associated with the backed up item. + /// Backed up item whose backup copies are to be fetched. + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RecoveryPointsList(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/recoveryPoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RecoveryPointsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the backup copies for the backed up item. + /// + /// OData filter options. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RecoveryPointsListViaIdentity(global::System.String viaIdentity, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/recoveryPoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/recoveryPoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RecoveryPointsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RecoveryPointsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up item. + /// Container name associated with the backed up item. + /// Backed up item whose backup copies are to be fetched. + /// OData filter options. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RecoveryPointsList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string Filter, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// Lists the recovery points recommended for move to another tier + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// + /// + /// List Recovery points Recommended for Move Request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RecoveryPointsRecommendedForMoveList(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IListRecoveryPointsRecommendedForMoveRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/recoveryPointsRecommendedForMove" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RecoveryPointsRecommendedForMoveList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists the recovery points recommended for move to another tier + /// + /// List Recovery points Recommended for Move Request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RecoveryPointsRecommendedForMoveListViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IListRecoveryPointsRecommendedForMoveRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/recoveryPointsRecommendedForMove$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/recoveryPointsRecommendedForMove" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RecoveryPointsRecommendedForMoveList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RecoveryPointsRecommendedForMoveList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.RecoveryPointResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// + /// + /// List Recovery points Recommended for Move Request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RecoveryPointsRecommendedForMoveList_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IListRecoveryPointsRecommendedForMoveRequest body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// List the ResourceGuardProxies under vault + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxiesGet(string vaultName, string resourceGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupResourceGuardProxies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxiesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List the ResourceGuardProxies under vault + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxiesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupResourceGuardProxies$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupResourceGuardProxies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxiesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxiesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceGuardProxyBaseResourceList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxiesGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Delete ResourceGuardProxy under vault + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxyDelete(string vaultName, string resourceGroupName, string subscriptionId, string resourceGuardProxyName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupResourceGuardProxies/" + + global::System.Uri.EscapeDataString(resourceGuardProxyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxyDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete ResourceGuardProxy under vault + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxyDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupResourceGuardProxies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGuardProxyName = _match.Groups["resourceGuardProxyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupResourceGuardProxies/" + + resourceGuardProxyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxyDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxyDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxyDelete_Validate(string vaultName, string resourceGroupName, string subscriptionId, string resourceGuardProxyName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGuardProxyName),resourceGuardProxyName); + } + } + + /// Returns ResourceGuardProxy under vault and with the name referenced in request + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxyGet(string vaultName, string resourceGroupName, string subscriptionId, string resourceGuardProxyName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupResourceGuardProxies/" + + global::System.Uri.EscapeDataString(resourceGuardProxyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxyGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Returns ResourceGuardProxy under vault and with the name referenced in request + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxyGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupResourceGuardProxies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGuardProxyName = _match.Groups["resourceGuardProxyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupResourceGuardProxies/" + + resourceGuardProxyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxyGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxyGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceGuardProxyBaseResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxyGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string resourceGuardProxyName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGuardProxyName),resourceGuardProxyName); + } + } + + /// + /// Add or Update ResourceGuardProxy under vault + /// Secures vault critical operations + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// Request body for operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxyPut(string vaultName, string resourceGroupName, string subscriptionId, string resourceGuardProxyName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupResourceGuardProxies/" + + global::System.Uri.EscapeDataString(resourceGuardProxyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxyPut_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Add or Update ResourceGuardProxy under vault + /// Secures vault critical operations + /// + /// + /// Request body for operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxyPutViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupResourceGuardProxies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGuardProxyName = _match.Groups["resourceGuardProxyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupResourceGuardProxies/" + + resourceGuardProxyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxyPut_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxyPut_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ResourceGuardProxyBaseResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// Request body for operation + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxyPut_Validate(string vaultName, string resourceGroupName, string subscriptionId, string resourceGuardProxyName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IResourceGuardProxyBaseResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGuardProxyName),resourceGuardProxyName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Secures delete ResourceGuardProxy operations. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// Request body for operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxyUnlockDelete(string vaultName, string resourceGroupName, string subscriptionId, string resourceGuardProxyName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupResourceGuardProxies/" + + global::System.Uri.EscapeDataString(resourceGuardProxyName) + + "/unlockDelete" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxyUnlockDelete_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Secures delete ResourceGuardProxy operations. + /// + /// Request body for operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceGuardProxyUnlockDeleteViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupResourceGuardProxies/(?[^/]+)/unlockDelete$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGuardProxyName = _match.Groups["resourceGuardProxyName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupResourceGuardProxies/" + + resourceGuardProxyName + + "/unlockDelete" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceGuardProxyUnlockDelete_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxyUnlockDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.UnlockDeleteResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// Request body for operation + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceGuardProxyUnlockDelete_Validate(string vaultName, string resourceGroupName, string subscriptionId, string resourceGuardProxyName, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IUnlockDeleteRequest body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGuardProxyName),resourceGuardProxyName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use + /// GetProtectedItemOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up items. + /// Container name associated with the backed up items. + /// Backed up item to be restored. + /// Recovery point ID which represents the backed up data to be restored. + /// + /// resource restore request + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RestoresTrigger(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestResource body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupFabrics/" + + global::System.Uri.EscapeDataString(fabricName) + + "/protectionContainers/" + + global::System.Uri.EscapeDataString(containerName) + + "/protectedItems/" + + global::System.Uri.EscapeDataString(protectedItemName) + + "/recoveryPoints/" + + global::System.Uri.EscapeDataString(recoveryPointId) + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RestoresTrigger_Call(request,onDefault,eventListener,sender); + } + } + + /// + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use + /// GetProtectedItemOperationResult API. + /// + /// + /// + /// resource restore request + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RestoresTriggerViaIdentity(global::System.String viaIdentity, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestResource body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupFabrics/(?[^/]+)/protectionContainers/(?[^/]+)/protectedItems/(?[^/]+)/recoveryPoints/(?[^/]+)/restore$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var fabricName = _match.Groups["fabricName"].Value; + var containerName = _match.Groups["containerName"].Value; + var protectedItemName = _match.Groups["protectedItemName"].Value; + var recoveryPointId = _match.Groups["recoveryPointId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupFabrics/" + + fabricName + + "/protectionContainers/" + + containerName + + "/protectedItems/" + + protectedItemName + + "/recoveryPoints/" + + recoveryPointId + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RestoresTrigger_Call(request,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RestoresTrigger_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// Fabric name associated with the backed up items. + /// Container name associated with the backed up items. + /// Backed up item to be restored. + /// Recovery point ID which represents the backed up data to be restored. + /// + /// resource restore request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RestoresTrigger_Validate(string vaultName, string resourceGroupName, string subscriptionId, string fabricName, string containerName, string protectedItemName, string recoveryPointId, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IRestoreRequestResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(fabricName),fabricName); + await eventListener.AssertNotNull(nameof(containerName),containerName); + await eventListener.AssertNotNull(nameof(protectedItemName),protectedItemName); + await eventListener.AssertNotNull(nameof(recoveryPointId),recoveryPointId); + await eventListener.AssertNotNull(nameof(xMSAuthorizationAuxiliary),xMSAuthorizationAuxiliary); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get the security PIN. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// security pin request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPiNsGet(string vaultName, string resourceGroupName, string subscriptionId, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecurityPinBase body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupSecurityPIN" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPiNsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get the security PIN. + /// + /// + /// security pin request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPiNsGetViaIdentity(global::System.String viaIdentity, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecurityPinBase body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupSecurityPIN$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupSecurityPIN" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != xMSAuthorizationAuxiliary) + { + request.Headers.Add("x-ms-authorization-auxiliary",xMSAuthorizationAuxiliary); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPiNsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPiNsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.TokenInformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// + /// security pin request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPiNsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string xMSAuthorizationAuxiliary, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ISecurityPinBase body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(xMSAuthorizationAuxiliary),xMSAuthorizationAuxiliary); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Gets the status of async operations of tiering cost + /// The subscription Id. + /// The name of the resource group where the recovery services vault is present. + /// The name of the recovery services vault. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TieringCostOperationStatusGet(string subscriptionId, string resourceGroupName, string vaultName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupTieringCost/default/operationsStatus/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TieringCostOperationStatusGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets the status of async operations of tiering cost + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TieringCostOperationStatusGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupTieringCost/default/operationsStatus/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/operationsStatus/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var vaultName = _match.Groups["vaultName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupTieringCost/default/operationsStatus/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TieringCostOperationStatusGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TieringCostOperationStatusGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The subscription Id. + /// The name of the resource group where the recovery services vault is present. + /// The name of the recovery services vault. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TieringCostOperationStatusGet_Validate(string subscriptionId, string resourceGroupName, string vaultName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertMinimumLength(nameof(vaultName),vaultName,2); + await eventListener.AssertMaximumLength(nameof(vaultName),vaultName,50); + await eventListener.AssertRegEx(nameof(vaultName),vaultName,@"^[A-Za-z][-A-Za-z0-9]*[A-Za-z0-9]$"); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// Fetches the result of a triggered validate operation. + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID which represents the operation whose result needs to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateOperationResultsGet(string vaultName, string resourceGroupName, string subscriptionId, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupValidateOperationResults/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateOperationResultsGet_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Fetches the result of a triggered validate operation. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateOperationResultsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupValidateOperationResults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationResults/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupValidateOperationResults/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateOperationResultsGet_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateOperationResultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.ValidateOperationsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID which represents the operation whose result needs to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateOperationResultsGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Fetches the status of a triggered validate operation. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. + /// If operation has completed, this method returns the list of errors obtained while validating the operation. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID represents the operation whose status needs to be fetched. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateOperationStatusesGet(string vaultName, string resourceGroupName, string subscriptionId, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupValidateOperationsStatuses/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Fetches the status of a triggered validate operation. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. + /// If operation has completed, this method returns the list of errors obtained while validating the operation. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateOperationStatusesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupValidateOperationsStatuses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationsStatuses/{operationId}'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupValidateOperationsStatuses/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateOperationStatusesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateOperationStatusesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// OperationID represents the operation whose status needs to be fetched. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateOperationStatusesGet_Validate(string vaultName, string resourceGroupName, string subscriptionId, string operationId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which + /// can be tracked using GetValidateOperationResult API. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// resource validate operation request + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateOperationTrigger(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.RecoveryServices/vaults/" + + global::System.Uri.EscapeDataString(vaultName) + + "/backupTriggerValidateOperation" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateOperationTrigger_Call(request,onDefault,eventListener,sender); + } + } + + /// + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which + /// can be tracked using GetValidateOperationResult API. + /// + /// + /// resource validate operation request + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateOperationTriggerViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-10-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.RecoveryServices/vaults/(?[^/]+)/backupTriggerValidateOperation$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation'"); + } + + // replace URI parameters with values from identity + var vaultName = _match.Groups["vaultName"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.RecoveryServices/vaults/" + + vaultName + + "/backupTriggerValidateOperation" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateOperationTrigger_Call(request,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateOperationTrigger_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. + /// The subscription Id. + /// resource validate operation request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateOperationTrigger_Validate(string vaultName, string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api20241001.IValidateOperationRequestResource body, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(vaultName),vaultName); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/AcquireStorageAccountLock.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/AcquireStorageAccountLock.cs new file mode 100644 index 000000000000..f8547221c855 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/AcquireStorageAccountLock.cs @@ -0,0 +1,98 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Whether storage account lock is to be acquired for this container or not. + public partial struct AcquireStorageAccountLock : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock Acquire = @"Acquire"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock NotAcquire = @"NotAcquire"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AcquireStorageAccountLock(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AcquireStorageAccountLock + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AcquireStorageAccountLock(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AcquireStorageAccountLock + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AcquireStorageAccountLock (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AcquireStorageAccountLock && Equals((AcquireStorageAccountLock)obj); + } + + /// Returns hashCode for enum AcquireStorageAccountLock + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AcquireStorageAccountLock + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AcquireStorageAccountLock + /// the value to convert to an instance of . + + public static implicit operator AcquireStorageAccountLock(string value) + { + return new AcquireStorageAccountLock(value); + } + + /// Implicit operator to convert AcquireStorageAccountLock to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock e) + { + return e._value; + } + + /// Overriding != operator for enum AcquireStorageAccountLock + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AcquireStorageAccountLock + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AcquireStorageAccountLock e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/AzureFileShareType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/AzureFileShareType.cs new file mode 100644 index 000000000000..d09dd7d3a792 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/AzureFileShareType.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// File Share type XSync or XSMB. + public partial struct AzureFileShareType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType XSync = @"XSync"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType Xsmb = @"XSMB"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AzureFileShareType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AzureFileShareType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AzureFileShareType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AzureFileShareType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AzureFileShareType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AzureFileShareType && Equals((AzureFileShareType)obj); + } + + /// Returns hashCode for enum AzureFileShareType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AzureFileShareType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AzureFileShareType + /// the value to convert to an instance of . + + public static implicit operator AzureFileShareType(string value) + { + return new AzureFileShareType(value); + } + + /// Implicit operator to convert AzureFileShareType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType e) + { + return e._value; + } + + /// Overriding != operator for enum AzureFileShareType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AzureFileShareType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.AzureFileShareType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupEngineType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupEngineType.cs new file mode 100644 index 000000000000..f25966ffdb67 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupEngineType.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of the backup engine. + public partial struct BackupEngineType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType AzureBackupServerEngine = @"AzureBackupServerEngine"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType DpmBackupEngine = @"DpmBackupEngine"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType Invalid = @"Invalid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private BackupEngineType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to BackupEngineType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new BackupEngineType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type BackupEngineType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type BackupEngineType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is BackupEngineType && Equals((BackupEngineType)obj); + } + + /// Returns hashCode for enum BackupEngineType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for BackupEngineType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to BackupEngineType + /// the value to convert to an instance of . + + public static implicit operator BackupEngineType(string value) + { + return new BackupEngineType(value); + } + + /// Implicit operator to convert BackupEngineType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType e) + { + return e._value; + } + + /// Overriding != operator for enum BackupEngineType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum BackupEngineType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupEngineType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupItemType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupItemType.cs new file mode 100644 index 000000000000..2f8094994c54 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupItemType.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of backup items associated with this container. + public partial struct BackupItemType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType AzureFileShare = @"AzureFileShare"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType AzureSqlDb = @"AzureSqlDb"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType Client = @"Client"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType Exchange = @"Exchange"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType FileFolder = @"FileFolder"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType GenericDataSource = @"GenericDataSource"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType SapAseDatabase = @"SAPAseDatabase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType SapHanaDatabase = @"SAPHanaDatabase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType SapHanaDbinstance = @"SAPHanaDBInstance"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType Sharepoint = @"Sharepoint"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType SqlDataBase = @"SQLDataBase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType Sqldb = @"SQLDB"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType SystemState = @"SystemState"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType VM = @"VM"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType VMwareVM = @"VMwareVM"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private BackupItemType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to BackupItemType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new BackupItemType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type BackupItemType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type BackupItemType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is BackupItemType && Equals((BackupItemType)obj); + } + + /// Returns hashCode for enum BackupItemType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for BackupItemType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to BackupItemType + /// the value to convert to an instance of . + + public static implicit operator BackupItemType(string value) + { + return new BackupItemType(value); + } + + /// Implicit operator to convert BackupItemType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType e) + { + return e._value; + } + + /// Overriding != operator for enum BackupItemType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum BackupItemType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupItemType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupManagementType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupManagementType.cs new file mode 100644 index 000000000000..4db5a1eb437e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupManagementType.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Backup management type to execute the current job. + public partial struct BackupManagementType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType AzureBackupServer = @"AzureBackupServer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType AzureIaasVM = @"AzureIaasVM"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType AzureSql = @"AzureSql"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType AzureStorage = @"AzureStorage"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType AzureWorkload = @"AzureWorkload"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType DefaultBackup = @"DefaultBackup"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType Dpm = @"DPM"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType Mab = @"MAB"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private BackupManagementType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to BackupManagementType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new BackupManagementType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type BackupManagementType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type BackupManagementType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is BackupManagementType && Equals((BackupManagementType)obj); + } + + /// Returns hashCode for enum BackupManagementType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for BackupManagementType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to BackupManagementType + /// the value to convert to an instance of . + + public static implicit operator BackupManagementType(string value) + { + return new BackupManagementType(value); + } + + /// Implicit operator to convert BackupManagementType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType e) + { + return e._value; + } + + /// Overriding != operator for enum BackupManagementType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum BackupManagementType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupManagementType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupType.cs new file mode 100644 index 000000000000..47302c279dd0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/BackupType.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of backup, viz. Full, Differential, Log or CopyOnlyFull + public partial struct BackupType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType CopyOnlyFull = @"CopyOnlyFull"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType Differential = @"Differential"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType Full = @"Full"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType Incremental = @"Incremental"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType Log = @"Log"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType SnapshotCopyOnlyFull = @"SnapshotCopyOnlyFull"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType SnapshotFull = @"SnapshotFull"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private BackupType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to BackupType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new BackupType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type BackupType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type BackupType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is BackupType && Equals((BackupType)obj); + } + + /// Returns hashCode for enum BackupType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for BackupType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to BackupType + /// the value to convert to an instance of . + + public static implicit operator BackupType(string value) + { + return new BackupType(value); + } + + /// Implicit operator to convert BackupType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType e) + { + return e._value; + } + + /// Overriding != operator for enum BackupType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum BackupType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.BackupType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ContainerType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ContainerType.cs new file mode 100644 index 000000000000..e4698cf9b455 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ContainerType.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of container for filter + public partial struct ContainerType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType AzureBackupServerContainer = @"AzureBackupServerContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType AzureSqlContainer = @"AzureSqlContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType Cluster = @"Cluster"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType DpmContainer = @"DPMContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType GenericContainer = @"GenericContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType HanaHsrContainer = @"HanaHSRContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType IaasVMContainer = @"IaasVMContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType IaasVMServiceContainer = @"IaasVMServiceContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType MabContainer = @"MABContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType SqlagWorkLoadContainer = @"SQLAGWorkLoadContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType StorageContainer = @"StorageContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType Unknown = @"Unknown"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType VCenter = @"VCenter"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType VMAppContainer = @"VMAppContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType Windows = @"Windows"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ContainerType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ContainerType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ContainerType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ContainerType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ContainerType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ContainerType && Equals((ContainerType)obj); + } + + /// Returns hashCode for enum ContainerType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ContainerType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ContainerType + /// the value to convert to an instance of . + + public static implicit operator ContainerType(string value) + { + return new ContainerType(value); + } + + /// Implicit operator to convert ContainerType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType e) + { + return e._value; + } + + /// Overriding != operator for enum ContainerType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ContainerType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ContainerType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/CopyOptions.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/CopyOptions.cs new file mode 100644 index 000000000000..5cd3213fe611 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/CopyOptions.cs @@ -0,0 +1,104 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Options to resolve copy conflicts. + public partial struct CopyOptions : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions CreateCopy = @"CreateCopy"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions FailOnConflict = @"FailOnConflict"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions Overwrite = @"Overwrite"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions Skip = @"Skip"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CopyOptions(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CopyOptions + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CopyOptions(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CopyOptions + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CopyOptions (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CopyOptions && Equals((CopyOptions)obj); + } + + /// Returns hashCode for enum CopyOptions + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CopyOptions + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CopyOptions + /// the value to convert to an instance of . + + public static implicit operator CopyOptions(string value) + { + return new CopyOptions(value); + } + + /// Implicit operator to convert CopyOptions to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions e) + { + return e._value; + } + + /// Overriding != operator for enum CopyOptions + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CopyOptions + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CopyOptions e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/CreateMode.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/CreateMode.cs new file mode 100644 index 000000000000..4c6726fe3148 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/CreateMode.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// + public partial struct CreateMode : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode Default = @"Default"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode Recover = @"Recover"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to CreateMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CreateMode(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CreateMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type CreateMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CreateMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CreateMode && Equals((CreateMode)obj); + } + + /// Returns hashCode for enum CreateMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CreateMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CreateMode + /// the value to convert to an instance of . + + public static implicit operator CreateMode(string value) + { + return new CreateMode(value); + } + + /// Implicit operator to convert CreateMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode e) + { + return e._value; + } + + /// Overriding != operator for enum CreateMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CreateMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.CreateMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DataMoveLevel.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DataMoveLevel.cs new file mode 100644 index 000000000000..c29ed084533f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DataMoveLevel.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// DataMove Level + public partial struct DataMoveLevel : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel Container = @"Container"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel Vault = @"Vault"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DataMoveLevel + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DataMoveLevel(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DataMoveLevel(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DataMoveLevel + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DataMoveLevel (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DataMoveLevel && Equals((DataMoveLevel)obj); + } + + /// Returns hashCode for enum DataMoveLevel + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DataMoveLevel + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DataMoveLevel + /// the value to convert to an instance of . + + public static implicit operator DataMoveLevel(string value) + { + return new DataMoveLevel(value); + } + + /// Implicit operator to convert DataMoveLevel to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel e) + { + return e._value; + } + + /// Overriding != operator for enum DataMoveLevel + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DataMoveLevel + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataMoveLevel e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DataSourceType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DataSourceType.cs new file mode 100644 index 000000000000..6ff359a26b34 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DataSourceType.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of workload this item represents. + public partial struct DataSourceType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType AzureFileShare = @"AzureFileShare"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType AzureSqlDb = @"AzureSqlDb"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType Client = @"Client"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType Exchange = @"Exchange"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType FileFolder = @"FileFolder"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType GenericDataSource = @"GenericDataSource"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType SapAseDatabase = @"SAPAseDatabase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType SapHanaDatabase = @"SAPHanaDatabase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType SapHanaDbinstance = @"SAPHanaDBInstance"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType Sharepoint = @"Sharepoint"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType SqlDataBase = @"SQLDataBase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType Sqldb = @"SQLDB"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType SystemState = @"SystemState"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType VM = @"VM"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType VMwareVM = @"VMwareVM"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DataSourceType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DataSourceType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DataSourceType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DataSourceType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DataSourceType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DataSourceType && Equals((DataSourceType)obj); + } + + /// Returns hashCode for enum DataSourceType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DataSourceType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DataSourceType + /// the value to convert to an instance of . + + public static implicit operator DataSourceType(string value) + { + return new DataSourceType(value); + } + + /// Implicit operator to convert DataSourceType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType e) + { + return e._value; + } + + /// Overriding != operator for enum DataSourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DataSourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DataSourceType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DayOfWeek.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DayOfWeek.cs new file mode 100644 index 000000000000..86d35e94672d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DayOfWeek.cs @@ -0,0 +1,107 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + public partial struct DayOfWeek : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek Friday = @"Friday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek Monday = @"Monday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek Saturday = @"Saturday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek Sunday = @"Sunday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek Thursday = @"Thursday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek Tuesday = @"Tuesday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek Wednesday = @"Wednesday"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DayOfWeek + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DayOfWeek(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DayOfWeek(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DayOfWeek + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DayOfWeek (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DayOfWeek && Equals((DayOfWeek)obj); + } + + /// Returns hashCode for enum DayOfWeek + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DayOfWeek + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DayOfWeek + /// the value to convert to an instance of . + + public static implicit operator DayOfWeek(string value) + { + return new DayOfWeek(value); + } + + /// Implicit operator to convert DayOfWeek to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek e) + { + return e._value; + } + + /// Overriding != operator for enum DayOfWeek + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DayOfWeek + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DayOfWeek e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DedupState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DedupState.cs new file mode 100644 index 000000000000..340655d64ecb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/DedupState.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Vault Dedup state + public partial struct DedupState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState Enabled = @"Enabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState Invalid = @"Invalid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DedupState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DedupState(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DedupState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DedupState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DedupState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DedupState && Equals((DedupState)obj); + } + + /// Returns hashCode for enum DedupState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DedupState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DedupState + /// the value to convert to an instance of . + + public static implicit operator DedupState(string value) + { + return new DedupState(value); + } + + /// Implicit operator to convert DedupState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState e) + { + return e._value; + } + + /// Overriding != operator for enum DedupState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DedupState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.DedupState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/EncryptionAtRestType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/EncryptionAtRestType.cs new file mode 100644 index 000000000000..40925af867c8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/EncryptionAtRestType.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Encryption At Rest Type + public partial struct EncryptionAtRestType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType CustomerManaged = @"CustomerManaged"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType MicrosoftManaged = @"MicrosoftManaged"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to EncryptionAtRestType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new EncryptionAtRestType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private EncryptionAtRestType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type EncryptionAtRestType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type EncryptionAtRestType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is EncryptionAtRestType && Equals((EncryptionAtRestType)obj); + } + + /// Returns hashCode for enum EncryptionAtRestType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for EncryptionAtRestType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to EncryptionAtRestType + /// the value to convert to an instance of . + + public static implicit operator EncryptionAtRestType(string value) + { + return new EncryptionAtRestType(value); + } + + /// Implicit operator to convert EncryptionAtRestType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType e) + { + return e._value; + } + + /// Overriding != operator for enum EncryptionAtRestType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum EncryptionAtRestType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EncryptionAtRestType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/EnhancedSecurityState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/EnhancedSecurityState.cs new file mode 100644 index 000000000000..52886e5ef0d9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/EnhancedSecurityState.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Enabled or Disabled. + public partial struct EnhancedSecurityState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState Enabled = @"Enabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState Invalid = @"Invalid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to EnhancedSecurityState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new EnhancedSecurityState(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private EnhancedSecurityState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type EnhancedSecurityState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type EnhancedSecurityState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is EnhancedSecurityState && Equals((EnhancedSecurityState)obj); + } + + /// Returns hashCode for enum EnhancedSecurityState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for EnhancedSecurityState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to EnhancedSecurityState + /// the value to convert to an instance of . + + public static implicit operator EnhancedSecurityState(string value) + { + return new EnhancedSecurityState(value); + } + + /// Implicit operator to convert EnhancedSecurityState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState e) + { + return e._value; + } + + /// Overriding != operator for enum EnhancedSecurityState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum EnhancedSecurityState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.EnhancedSecurityState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/FabricName.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/FabricName.cs new file mode 100644 index 000000000000..7e1d5f9c697b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/FabricName.cs @@ -0,0 +1,98 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Specifies the fabric name - Azure or AD + public partial struct FabricName : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName Azure = @"Azure"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName Invalid = @"Invalid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to FabricName + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new FabricName(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type FabricName + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type FabricName (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is FabricName && Equals((FabricName)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private FabricName(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum FabricName + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for FabricName + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to FabricName + /// the value to convert to an instance of . + + public static implicit operator FabricName(string value) + { + return new FabricName(value); + } + + /// Implicit operator to convert FabricName to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName e) + { + return e._value; + } + + /// Overriding != operator for enum FabricName + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum FabricName + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.FabricName e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/HealthState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/HealthState.cs new file mode 100644 index 000000000000..a1a1fab2ec2e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/HealthState.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Health State for the backed up item. + public partial struct HealthState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState ActionRequired = @"ActionRequired"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState ActionSuggested = @"ActionSuggested"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState Passed = @"Passed"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to HealthState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new HealthState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type HealthState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type HealthState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is HealthState && Equals((HealthState)obj); + } + + /// Returns hashCode for enum HealthState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private HealthState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for HealthState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to HealthState + /// the value to convert to an instance of . + + public static implicit operator HealthState(string value) + { + return new HealthState(value); + } + + /// Implicit operator to convert HealthState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState e) + { + return e._value; + } + + /// Overriding != operator for enum HealthState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum HealthState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/HealthStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/HealthStatus.cs new file mode 100644 index 000000000000..c052f1e8d0b0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/HealthStatus.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Health status of protected item. + public partial struct HealthStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus ActionRequired = @"ActionRequired"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus ActionSuggested = @"ActionSuggested"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus Passed = @"Passed"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to HealthStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new HealthStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type HealthStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type HealthStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is HealthStatus && Equals((HealthStatus)obj); + } + + /// Returns hashCode for enum HealthStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private HealthStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for HealthStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to HealthStatus + /// the value to convert to an instance of . + + public static implicit operator HealthStatus(string value) + { + return new HealthStatus(value); + } + + /// Implicit operator to convert HealthStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus e) + { + return e._value; + } + + /// Overriding != operator for enum HealthStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum HealthStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HealthStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/HttpStatusCode.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/HttpStatusCode.cs new file mode 100644 index 000000000000..80367f79e1a3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/HttpStatusCode.cs @@ -0,0 +1,188 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// HTTP Status Code of the operation. + public partial struct HttpStatusCode : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Accepted = @"Accepted"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Ambiguous = @"Ambiguous"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode BadGateway = @"BadGateway"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode BadRequest = @"BadRequest"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Conflict = @"Conflict"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Continue = @"Continue"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Created = @"Created"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode ExpectationFailed = @"ExpectationFailed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Forbidden = @"Forbidden"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Found = @"Found"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode GatewayTimeout = @"GatewayTimeout"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Gone = @"Gone"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode HttpVersionNotSupported = @"HttpVersionNotSupported"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode InternalServerError = @"InternalServerError"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode LengthRequired = @"LengthRequired"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode MethodNotAllowed = @"MethodNotAllowed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Moved = @"Moved"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode MovedPermanently = @"MovedPermanently"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode MultipleChoices = @"MultipleChoices"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode NoContent = @"NoContent"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode NonAuthoritativeInformation = @"NonAuthoritativeInformation"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode NotAcceptable = @"NotAcceptable"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode NotFound = @"NotFound"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode NotImplemented = @"NotImplemented"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode NotModified = @"NotModified"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Ok = @"OK"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode PartialContent = @"PartialContent"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode PaymentRequired = @"PaymentRequired"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode PreconditionFailed = @"PreconditionFailed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode ProxyAuthenticationRequired = @"ProxyAuthenticationRequired"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Redirect = @"Redirect"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode RedirectKeepVerb = @"RedirectKeepVerb"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode RedirectMethod = @"RedirectMethod"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode RequestEntityTooLarge = @"RequestEntityTooLarge"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode RequestTimeout = @"RequestTimeout"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode RequestUriTooLong = @"RequestUriTooLong"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode RequestedRangeNotSatisfiable = @"RequestedRangeNotSatisfiable"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode ResetContent = @"ResetContent"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode SeeOther = @"SeeOther"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode ServiceUnavailable = @"ServiceUnavailable"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode SwitchingProtocols = @"SwitchingProtocols"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode TemporaryRedirect = @"TemporaryRedirect"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Unauthorized = @"Unauthorized"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode UnsupportedMediaType = @"UnsupportedMediaType"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode Unused = @"Unused"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode UpgradeRequired = @"UpgradeRequired"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode UseProxy = @"UseProxy"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to HttpStatusCode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new HttpStatusCode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type HttpStatusCode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type HttpStatusCode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is HttpStatusCode && Equals((HttpStatusCode)obj); + } + + /// Returns hashCode for enum HttpStatusCode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private HttpStatusCode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for HttpStatusCode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to HttpStatusCode + /// the value to convert to an instance of . + + public static implicit operator HttpStatusCode(string value) + { + return new HttpStatusCode(value); + } + + /// Implicit operator to convert HttpStatusCode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode e) + { + return e._value; + } + + /// Overriding != operator for enum HttpStatusCode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum HttpStatusCode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.HttpStatusCode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/IaasVMSnapshotConsistencyType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/IaasVMSnapshotConsistencyType.cs new file mode 100644 index 000000000000..ce650f9c29e5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/IaasVMSnapshotConsistencyType.cs @@ -0,0 +1,101 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + public partial struct IaasVMSnapshotConsistencyType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType OnlyCrashConsistent = @"OnlyCrashConsistent"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to IaasVMSnapshotConsistencyType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new IaasVMSnapshotConsistencyType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type IaasVMSnapshotConsistencyType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type IaasVMSnapshotConsistencyType (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is IaasVMSnapshotConsistencyType && Equals((IaasVMSnapshotConsistencyType)obj); + } + + /// Returns hashCode for enum IaasVMSnapshotConsistencyType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private IaasVMSnapshotConsistencyType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for IaasVMSnapshotConsistencyType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to IaasVMSnapshotConsistencyType + /// the value to convert to an instance of . + + public static implicit operator IaasVMSnapshotConsistencyType(string value) + { + return new IaasVMSnapshotConsistencyType(value); + } + + /// Implicit operator to convert IaasVMSnapshotConsistencyType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType e) + { + return e._value; + } + + /// Overriding != operator for enum IaasVMSnapshotConsistencyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum IaasVMSnapshotConsistencyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasVMSnapshotConsistencyType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/IaasvmPolicyType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/IaasvmPolicyType.cs new file mode 100644 index 000000000000..46235153c8d8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/IaasvmPolicyType.cs @@ -0,0 +1,99 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + public partial struct IaasvmPolicyType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType V1 = @"V1"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType V2 = @"V2"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to IaasvmPolicyType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new IaasvmPolicyType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type IaasvmPolicyType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type IaasvmPolicyType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is IaasvmPolicyType && Equals((IaasvmPolicyType)obj); + } + + /// Returns hashCode for enum IaasvmPolicyType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private IaasvmPolicyType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for IaasvmPolicyType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to IaasvmPolicyType + /// the value to convert to an instance of . + + public static implicit operator IaasvmPolicyType(string value) + { + return new IaasvmPolicyType(value); + } + + /// Implicit operator to convert IaasvmPolicyType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType e) + { + return e._value; + } + + /// Overriding != operator for enum IaasvmPolicyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum IaasvmPolicyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IaasvmPolicyType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/InfrastructureEncryptionState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/InfrastructureEncryptionState.cs new file mode 100644 index 000000000000..630ae55cdf7d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/InfrastructureEncryptionState.cs @@ -0,0 +1,105 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + public partial struct InfrastructureEncryptionState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState Enabled = @"Enabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState Invalid = @"Invalid"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to InfrastructureEncryptionState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new InfrastructureEncryptionState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type InfrastructureEncryptionState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type InfrastructureEncryptionState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is InfrastructureEncryptionState && Equals((InfrastructureEncryptionState)obj); + } + + /// Returns hashCode for enum InfrastructureEncryptionState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private InfrastructureEncryptionState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for InfrastructureEncryptionState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to InfrastructureEncryptionState + /// the value to convert to an instance of . + + public static implicit operator InfrastructureEncryptionState(string value) + { + return new InfrastructureEncryptionState(value); + } + + /// Implicit operator to convert InfrastructureEncryptionState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState e) + { + return e._value; + } + + /// Overriding != operator for enum InfrastructureEncryptionState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum InfrastructureEncryptionState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InfrastructureEncryptionState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/InquiryStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/InquiryStatus.cs new file mode 100644 index 000000000000..900ffb8294ac --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/InquiryStatus.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + public partial struct InquiryStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus Success = @"Success"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to InquiryStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new InquiryStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type InquiryStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type InquiryStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is InquiryStatus && Equals((InquiryStatus)obj); + } + + /// Returns hashCode for enum InquiryStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private InquiryStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for InquiryStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to InquiryStatus + /// the value to convert to an instance of . + + public static implicit operator InquiryStatus(string value) + { + return new InquiryStatus(value); + } + + /// Implicit operator to convert InquiryStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus e) + { + return e._value; + } + + /// Overriding != operator for enum InquiryStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum InquiryStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.InquiryStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/IntentItemType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/IntentItemType.cs new file mode 100644 index 000000000000..3040d5c928bc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/IntentItemType.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of workload this item represents + public partial struct IntentItemType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType SqlAvailabilityGroupContainer = @"SQLAvailabilityGroupContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType SqlInstance = @"SQLInstance"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to IntentItemType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new IntentItemType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type IntentItemType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type IntentItemType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is IntentItemType && Equals((IntentItemType)obj); + } + + /// Returns hashCode for enum IntentItemType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private IntentItemType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for IntentItemType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to IntentItemType + /// the value to convert to an instance of . + + public static implicit operator IntentItemType(string value) + { + return new IntentItemType(value); + } + + /// Implicit operator to convert IntentItemType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType e) + { + return e._value; + } + + /// Overriding != operator for enum IntentItemType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum IntentItemType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.IntentItemType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/JobOperationType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/JobOperationType.cs new file mode 100644 index 000000000000..d93aee49a891 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/JobOperationType.cs @@ -0,0 +1,116 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of operation. + public partial struct JobOperationType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType Backup = @"Backup"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType ConfigureBackup = @"ConfigureBackup"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType CrossRegionRestore = @"CrossRegionRestore"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType DeleteBackupData = @"DeleteBackupData"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType DisableBackup = @"DisableBackup"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType Register = @"Register"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType Restore = @"Restore"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType UnRegister = @"UnRegister"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType Undelete = @"Undelete"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType UpdateCustomerManagedKey = @"UpdateCustomerManagedKey"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to JobOperationType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new JobOperationType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type JobOperationType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type JobOperationType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is JobOperationType && Equals((JobOperationType)obj); + } + + /// Returns hashCode for enum JobOperationType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private JobOperationType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for JobOperationType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to JobOperationType + /// the value to convert to an instance of . + + public static implicit operator JobOperationType(string value) + { + return new JobOperationType(value); + } + + /// Implicit operator to convert JobOperationType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType e) + { + return e._value; + } + + /// Overriding != operator for enum JobOperationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum JobOperationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobOperationType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/JobStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/JobStatus.cs new file mode 100644 index 000000000000..d4a636e52bde --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/JobStatus.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Status of the job. + public partial struct JobStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus Cancelled = @"Cancelled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus Cancelling = @"Cancelling"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus Completed = @"Completed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus CompletedWithWarnings = @"CompletedWithWarnings"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus InProgress = @"InProgress"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus Invalid = @"Invalid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to JobStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new JobStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type JobStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type JobStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is JobStatus && Equals((JobStatus)obj); + } + + /// Returns hashCode for enum JobStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private JobStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for JobStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to JobStatus + /// the value to convert to an instance of . + + public static implicit operator JobStatus(string value) + { + return new JobStatus(value); + } + + /// Implicit operator to convert JobStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus e) + { + return e._value; + } + + /// Overriding != operator for enum JobStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum JobStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/JobSupportedAction.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/JobSupportedAction.cs new file mode 100644 index 000000000000..98476c3dabce --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/JobSupportedAction.cs @@ -0,0 +1,99 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + public partial struct JobSupportedAction : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction Cancellable = @"Cancellable"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction Retriable = @"Retriable"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to JobSupportedAction + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new JobSupportedAction(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type JobSupportedAction + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type JobSupportedAction (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is JobSupportedAction && Equals((JobSupportedAction)obj); + } + + /// Returns hashCode for enum JobSupportedAction + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private JobSupportedAction(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for JobSupportedAction + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to JobSupportedAction + /// the value to convert to an instance of . + + public static implicit operator JobSupportedAction(string value) + { + return new JobSupportedAction(value); + } + + /// Implicit operator to convert JobSupportedAction to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction e) + { + return e._value; + } + + /// Overriding != operator for enum JobSupportedAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum JobSupportedAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.JobSupportedAction e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/LastBackupStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/LastBackupStatus.cs new file mode 100644 index 000000000000..cf2da2b8021c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/LastBackupStatus.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + public partial struct LastBackupStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus Healthy = @"Healthy"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus IrPending = @"IRPending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus Unhealthy = @"Unhealthy"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LastBackupStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LastBackupStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LastBackupStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LastBackupStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LastBackupStatus && Equals((LastBackupStatus)obj); + } + + /// Returns hashCode for enum LastBackupStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LastBackupStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LastBackupStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LastBackupStatus + /// the value to convert to an instance of . + + public static implicit operator LastBackupStatus(string value) + { + return new LastBackupStatus(value); + } + + /// Implicit operator to convert LastBackupStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus e) + { + return e._value; + } + + /// Overriding != operator for enum LastBackupStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LastBackupStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastBackupStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/LastUpdateStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/LastUpdateStatus.cs new file mode 100644 index 000000000000..04bf8733c723 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/LastUpdateStatus.cs @@ -0,0 +1,109 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + public partial struct LastUpdateStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus FirstInitialization = @"FirstInitialization"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus Initialized = @"Initialized"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus NotEnabled = @"NotEnabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus PartiallyFailed = @"PartiallyFailed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus PartiallySucceeded = @"PartiallySucceeded"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus Succeeded = @"Succeeded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LastUpdateStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LastUpdateStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LastUpdateStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LastUpdateStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LastUpdateStatus && Equals((LastUpdateStatus)obj); + } + + /// Returns hashCode for enum LastUpdateStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LastUpdateStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LastUpdateStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LastUpdateStatus + /// the value to convert to an instance of . + + public static implicit operator LastUpdateStatus(string value) + { + return new LastUpdateStatus(value); + } + + /// Implicit operator to convert LastUpdateStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus e) + { + return e._value; + } + + /// Overriding != operator for enum LastUpdateStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LastUpdateStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.LastUpdateStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/MabServerType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/MabServerType.cs new file mode 100644 index 000000000000..bcd01877209a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/MabServerType.cs @@ -0,0 +1,124 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Server type of MAB container. + public partial struct MabServerType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType AzureBackupServerContainer = @"AzureBackupServerContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType AzureSqlContainer = @"AzureSqlContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType Cluster = @"Cluster"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType DpmContainer = @"DPMContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType GenericContainer = @"GenericContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType IaasVMContainer = @"IaasVMContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType IaasVMServiceContainer = @"IaasVMServiceContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType MabContainer = @"MABContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType SqlagWorkLoadContainer = @"SQLAGWorkLoadContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType StorageContainer = @"StorageContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType Unknown = @"Unknown"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType VCenter = @"VCenter"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType VMAppContainer = @"VMAppContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType Windows = @"Windows"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to MabServerType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new MabServerType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type MabServerType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type MabServerType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is MabServerType && Equals((MabServerType)obj); + } + + /// Returns hashCode for enum MabServerType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private MabServerType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for MabServerType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to MabServerType + /// the value to convert to an instance of . + + public static implicit operator MabServerType(string value) + { + return new MabServerType(value); + } + + /// Implicit operator to convert MabServerType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType e) + { + return e._value; + } + + /// Overriding != operator for enum MabServerType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum MabServerType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MabServerType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/MonthOfYear.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/MonthOfYear.cs new file mode 100644 index 000000000000..1ebace41628f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/MonthOfYear.cs @@ -0,0 +1,119 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + public partial struct MonthOfYear : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear April = @"April"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear August = @"August"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear December = @"December"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear February = @"February"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear January = @"January"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear July = @"July"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear June = @"June"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear March = @"March"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear May = @"May"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear November = @"November"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear October = @"October"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear September = @"September"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to MonthOfYear + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new MonthOfYear(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type MonthOfYear + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type MonthOfYear (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is MonthOfYear && Equals((MonthOfYear)obj); + } + + /// Returns hashCode for enum MonthOfYear + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private MonthOfYear(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for MonthOfYear + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to MonthOfYear + /// the value to convert to an instance of . + + public static implicit operator MonthOfYear(string value) + { + return new MonthOfYear(value); + } + + /// Implicit operator to convert MonthOfYear to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear e) + { + return e._value; + } + + /// Overriding != operator for enum MonthOfYear + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum MonthOfYear + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.MonthOfYear e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/OperationStatusValues.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/OperationStatusValues.cs new file mode 100644 index 000000000000..e160e938369c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/OperationStatusValues.cs @@ -0,0 +1,104 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Operation status. + public partial struct OperationStatusValues : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues Canceled = @"Canceled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues InProgress = @"InProgress"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues Succeeded = @"Succeeded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to OperationStatusValues + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OperationStatusValues(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OperationStatusValues + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type OperationStatusValues (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OperationStatusValues && Equals((OperationStatusValues)obj); + } + + /// Returns hashCode for enum OperationStatusValues + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private OperationStatusValues(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OperationStatusValues + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OperationStatusValues + /// the value to convert to an instance of . + + public static implicit operator OperationStatusValues(string value) + { + return new OperationStatusValues(value); + } + + /// Implicit operator to convert OperationStatusValues to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues e) + { + return e._value; + } + + /// Overriding != operator for enum OperationStatusValues + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OperationStatusValues + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationStatusValues e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/OperationType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/OperationType.cs new file mode 100644 index 000000000000..708af222128c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/OperationType.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Re-Do Operation + public partial struct OperationType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType Register = @"Register"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType Rehydrate = @"Rehydrate"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType Reregister = @"Reregister"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to OperationType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OperationType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OperationType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type OperationType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OperationType && Equals((OperationType)obj); + } + + /// Returns hashCode for enum OperationType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private OperationType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OperationType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OperationType + /// the value to convert to an instance of . + + public static implicit operator OperationType(string value) + { + return new OperationType(value); + } + + /// Implicit operator to convert OperationType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType e) + { + return e._value; + } + + /// Overriding != operator for enum OperationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OperationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OperationType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/OverwriteOptions.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/OverwriteOptions.cs new file mode 100644 index 000000000000..25bf8140f6c0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/OverwriteOptions.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Can Overwrite if Target DataBase already exists + public partial struct OverwriteOptions : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions FailOnConflict = @"FailOnConflict"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions Overwrite = @"Overwrite"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to OverwriteOptions + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OverwriteOptions(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OverwriteOptions + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type OverwriteOptions (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OverwriteOptions && Equals((OverwriteOptions)obj); + } + + /// Returns hashCode for enum OverwriteOptions + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private OverwriteOptions(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OverwriteOptions + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OverwriteOptions + /// the value to convert to an instance of . + + public static implicit operator OverwriteOptions(string value) + { + return new OverwriteOptions(value); + } + + /// Implicit operator to convert OverwriteOptions to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions e) + { + return e._value; + } + + /// Overriding != operator for enum OverwriteOptions + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OverwriteOptions + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.OverwriteOptions e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/PolicyType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/PolicyType.cs new file mode 100644 index 000000000000..f37d8e24ef98 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/PolicyType.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of backup policy type + public partial struct PolicyType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType CopyOnlyFull = @"CopyOnlyFull"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType Differential = @"Differential"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType Full = @"Full"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType Incremental = @"Incremental"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType Log = @"Log"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType SnapshotCopyOnlyFull = @"SnapshotCopyOnlyFull"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType SnapshotFull = @"SnapshotFull"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PolicyType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PolicyType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PolicyType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PolicyType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PolicyType && Equals((PolicyType)obj); + } + + /// Returns hashCode for enum PolicyType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PolicyType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PolicyType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PolicyType + /// the value to convert to an instance of . + + public static implicit operator PolicyType(string value) + { + return new PolicyType(value); + } + + /// Implicit operator to convert PolicyType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType e) + { + return e._value; + } + + /// Overriding != operator for enum PolicyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PolicyType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PolicyType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/PrivateEndpointConnectionStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/PrivateEndpointConnectionStatus.cs new file mode 100644 index 000000000000..c877643b4785 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/PrivateEndpointConnectionStatus.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Gets or sets the status + public partial struct PrivateEndpointConnectionStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus Approved = @"Approved"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus Disconnected = @"Disconnected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus Pending = @"Pending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus Rejected = @"Rejected"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to PrivateEndpointConnectionStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PrivateEndpointConnectionStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PrivateEndpointConnectionStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type PrivateEndpointConnectionStatus (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PrivateEndpointConnectionStatus && Equals((PrivateEndpointConnectionStatus)obj); + } + + /// Returns hashCode for enum PrivateEndpointConnectionStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private PrivateEndpointConnectionStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PrivateEndpointConnectionStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PrivateEndpointConnectionStatus + /// the value to convert to an instance of . + + public static implicit operator PrivateEndpointConnectionStatus(string value) + { + return new PrivateEndpointConnectionStatus(value); + } + + /// Implicit operator to convert PrivateEndpointConnectionStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus e) + { + return e._value; + } + + /// Overriding != operator for enum PrivateEndpointConnectionStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PrivateEndpointConnectionStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.PrivateEndpointConnectionStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectableContainerType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectableContainerType.cs new file mode 100644 index 000000000000..7d55fbc863f2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectableContainerType.cs @@ -0,0 +1,134 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// + /// Type of the container. The value of this property for + /// 1. Compute Azure VM is Microsoft.Compute/virtualMachines + /// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + /// + public partial struct ProtectableContainerType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType AzureBackupServerContainer = @"AzureBackupServerContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType AzureSqlContainer = @"AzureSqlContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType AzureWorkloadContainer = @"AzureWorkloadContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType Cluster = @"Cluster"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType DpmContainer = @"DPMContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType GenericContainer = @"GenericContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType IaasVMContainer = @"IaasVMContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType IaasVMServiceContainer = @"IaasVMServiceContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType MabContainer = @"MABContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType MicrosoftClassicComputeVirtualMachines = @"Microsoft.ClassicCompute/virtualMachines"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType MicrosoftComputeVirtualMachines = @"Microsoft.Compute/virtualMachines"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType SqlagWorkLoadContainer = @"SQLAGWorkLoadContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType StorageContainer = @"StorageContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType Unknown = @"Unknown"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType VCenter = @"VCenter"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType VMAppContainer = @"VMAppContainer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType Windows = @"Windows"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProtectableContainerType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProtectableContainerType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProtectableContainerType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProtectableContainerType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProtectableContainerType && Equals((ProtectableContainerType)obj); + } + + /// Returns hashCode for enum ProtectableContainerType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProtectableContainerType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProtectableContainerType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProtectableContainerType + /// the value to convert to an instance of . + + public static implicit operator ProtectableContainerType(string value) + { + return new ProtectableContainerType(value); + } + + /// Implicit operator to convert ProtectableContainerType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType e) + { + return e._value; + } + + /// Overriding != operator for enum ProtectableContainerType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProtectableContainerType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectableContainerType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectedItemHealthStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectedItemHealthStatus.cs new file mode 100644 index 000000000000..cc4de1ef89e3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectedItemHealthStatus.cs @@ -0,0 +1,104 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Health status of the backup item, evaluated based on last heartbeat received + public partial struct ProtectedItemHealthStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus Healthy = @"Healthy"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus IrPending = @"IRPending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus NotReachable = @"NotReachable"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus Unhealthy = @"Unhealthy"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProtectedItemHealthStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProtectedItemHealthStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProtectedItemHealthStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProtectedItemHealthStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProtectedItemHealthStatus && Equals((ProtectedItemHealthStatus)obj); + } + + /// Returns hashCode for enum ProtectedItemHealthStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProtectedItemHealthStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProtectedItemHealthStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProtectedItemHealthStatus + /// the value to convert to an instance of . + + public static implicit operator ProtectedItemHealthStatus(string value) + { + return new ProtectedItemHealthStatus(value); + } + + /// Implicit operator to convert ProtectedItemHealthStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus e) + { + return e._value; + } + + /// Overriding != operator for enum ProtectedItemHealthStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProtectedItemHealthStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemHealthStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectedItemState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectedItemState.cs new file mode 100644 index 000000000000..4e8cee2f6f90 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectedItemState.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Backup state of the backed up item. + public partial struct ProtectedItemState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState BackupsSuspended = @"BackupsSuspended"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState IrPending = @"IRPending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState Protected = @"Protected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState ProtectionError = @"ProtectionError"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState ProtectionPaused = @"ProtectionPaused"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState ProtectionStopped = @"ProtectionStopped"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProtectedItemState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProtectedItemState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProtectedItemState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProtectedItemState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProtectedItemState && Equals((ProtectedItemState)obj); + } + + /// Returns hashCode for enum ProtectedItemState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProtectedItemState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProtectedItemState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProtectedItemState + /// the value to convert to an instance of . + + public static implicit operator ProtectedItemState(string value) + { + return new ProtectedItemState(value); + } + + /// Implicit operator to convert ProtectedItemState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState e) + { + return e._value; + } + + /// Overriding != operator for enum ProtectedItemState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProtectedItemState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectedItemState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectionIntentItemType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectionIntentItemType.cs new file mode 100644 index 000000000000..2a3b3e00e00a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectionIntentItemType.cs @@ -0,0 +1,106 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// backup protectionIntent type. + public partial struct ProtectionIntentItemType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType AzureResourceItem = @"AzureResourceItem"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType AzureWorkloadAutoProtectionIntent = @"AzureWorkloadAutoProtectionIntent"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType AzureWorkloadContainerAutoProtectionIntent = @"AzureWorkloadContainerAutoProtectionIntent"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType AzureWorkloadSqlAutoProtectionIntent = @"AzureWorkloadSQLAutoProtectionIntent"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType RecoveryServiceVaultItem = @"RecoveryServiceVaultItem"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProtectionIntentItemType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProtectionIntentItemType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProtectionIntentItemType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProtectionIntentItemType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProtectionIntentItemType && Equals((ProtectionIntentItemType)obj); + } + + /// Returns hashCode for enum ProtectionIntentItemType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProtectionIntentItemType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProtectionIntentItemType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProtectionIntentItemType + /// the value to convert to an instance of . + + public static implicit operator ProtectionIntentItemType(string value) + { + return new ProtectionIntentItemType(value); + } + + /// Implicit operator to convert ProtectionIntentItemType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType e) + { + return e._value; + } + + /// Overriding != operator for enum ProtectionIntentItemType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProtectionIntentItemType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionIntentItemType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectionState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectionState.cs new file mode 100644 index 000000000000..bfb55888d4e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectionState.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Backup state of this backup item. + public partial struct ProtectionState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState BackupsSuspended = @"BackupsSuspended"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState IrPending = @"IRPending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState Protected = @"Protected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState ProtectionError = @"ProtectionError"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState ProtectionPaused = @"ProtectionPaused"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState ProtectionStopped = @"ProtectionStopped"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProtectionState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProtectionState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProtectionState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProtectionState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProtectionState && Equals((ProtectionState)obj); + } + + /// Returns hashCode for enum ProtectionState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProtectionState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProtectionState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProtectionState + /// the value to convert to an instance of . + + public static implicit operator ProtectionState(string value) + { + return new ProtectionState(value); + } + + /// Implicit operator to convert ProtectionState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState e) + { + return e._value; + } + + /// Overriding != operator for enum ProtectionState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProtectionState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectionStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectionStatus.cs new file mode 100644 index 000000000000..dcfabc0445f6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProtectionStatus.cs @@ -0,0 +1,104 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Specifies whether the container is registered or not + public partial struct ProtectionStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus NotProtected = @"NotProtected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus Protected = @"Protected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus Protecting = @"Protecting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus ProtectionFailed = @"ProtectionFailed"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProtectionStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProtectionStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProtectionStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProtectionStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProtectionStatus && Equals((ProtectionStatus)obj); + } + + /// Returns hashCode for enum ProtectionStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProtectionStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProtectionStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProtectionStatus + /// the value to convert to an instance of . + + public static implicit operator ProtectionStatus(string value) + { + return new ProtectionStatus(value); + } + + /// Implicit operator to convert ProtectionStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus e) + { + return e._value; + } + + /// Overriding != operator for enum ProtectionStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProtectionStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProtectionStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProvisioningState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProvisioningState.cs new file mode 100644 index 000000000000..6e78756e37c1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ProvisioningState.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Gets or sets provisioning state of the private endpoint connection + public partial struct ProvisioningState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState Deleting = @"Deleting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState Pending = @"Pending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState Succeeded = @"Succeeded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProvisioningState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProvisioningState && Equals((ProvisioningState)obj); + } + + /// Returns hashCode for enum ProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProvisioningState + /// the value to convert to an instance of . + + public static implicit operator ProvisioningState(string value) + { + return new ProvisioningState(value); + } + + /// Implicit operator to convert ProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum ProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryMode.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryMode.cs new file mode 100644 index 000000000000..d7881e97eae8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryMode.cs @@ -0,0 +1,106 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Defines whether the current recovery mode is file restore or database restore + public partial struct RecoveryMode : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode FileRecovery = @"FileRecovery"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode RecoveryUsingSnapshot = @"RecoveryUsingSnapshot"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode SnapshotAttach = @"SnapshotAttach"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode SnapshotAttachAndRecover = @"SnapshotAttachAndRecover"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode WorkloadRecovery = @"WorkloadRecovery"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RecoveryMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RecoveryMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RecoveryMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RecoveryMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RecoveryMode && Equals((RecoveryMode)obj); + } + + /// Returns hashCode for enum RecoveryMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RecoveryMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RecoveryMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RecoveryMode + /// the value to convert to an instance of . + + public static implicit operator RecoveryMode(string value) + { + return new RecoveryMode(value); + } + + /// Implicit operator to convert RecoveryMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode e) + { + return e._value; + } + + /// Overriding != operator for enum RecoveryMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RecoveryMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryPointTierStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryPointTierStatus.cs new file mode 100644 index 000000000000..c971d1d2a6fe --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryPointTierStatus.cs @@ -0,0 +1,104 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Recovery point tier status. + public partial struct RecoveryPointTierStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus Deleted = @"Deleted"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus Rehydrated = @"Rehydrated"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus Valid = @"Valid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RecoveryPointTierStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RecoveryPointTierStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RecoveryPointTierStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RecoveryPointTierStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RecoveryPointTierStatus && Equals((RecoveryPointTierStatus)obj); + } + + /// Returns hashCode for enum RecoveryPointTierStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RecoveryPointTierStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RecoveryPointTierStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RecoveryPointTierStatus + /// the value to convert to an instance of . + + public static implicit operator RecoveryPointTierStatus(string value) + { + return new RecoveryPointTierStatus(value); + } + + /// Implicit operator to convert RecoveryPointTierStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus e) + { + return e._value; + } + + /// Overriding != operator for enum RecoveryPointTierStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RecoveryPointTierStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryPointTierType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryPointTierType.cs new file mode 100644 index 000000000000..77a98253c70a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryPointTierType.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Recovery point tier type. + public partial struct RecoveryPointTierType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType ArchivedRp = @"ArchivedRP"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType HardenedRp = @"HardenedRP"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType InstantRp = @"InstantRP"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType Invalid = @"Invalid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RecoveryPointTierType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RecoveryPointTierType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RecoveryPointTierType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RecoveryPointTierType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RecoveryPointTierType && Equals((RecoveryPointTierType)obj); + } + + /// Returns hashCode for enum RecoveryPointTierType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RecoveryPointTierType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RecoveryPointTierType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RecoveryPointTierType + /// the value to convert to an instance of . + + public static implicit operator RecoveryPointTierType(string value) + { + return new RecoveryPointTierType(value); + } + + /// Implicit operator to convert RecoveryPointTierType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType e) + { + return e._value; + } + + /// Overriding != operator for enum RecoveryPointTierType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RecoveryPointTierType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryPointTierType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryType.cs new file mode 100644 index 000000000000..6d7969a886fe --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RecoveryType.cs @@ -0,0 +1,104 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of this recovery. + public partial struct RecoveryType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType AlternateLocation = @"AlternateLocation"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType Offline = @"Offline"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType OriginalLocation = @"OriginalLocation"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType RestoreDisks = @"RestoreDisks"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RecoveryType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RecoveryType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RecoveryType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RecoveryType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RecoveryType && Equals((RecoveryType)obj); + } + + /// Returns hashCode for enum RecoveryType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RecoveryType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RecoveryType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RecoveryType + /// the value to convert to an instance of . + + public static implicit operator RecoveryType(string value) + { + return new RecoveryType(value); + } + + /// Implicit operator to convert RecoveryType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType e) + { + return e._value; + } + + /// Overriding != operator for enum RecoveryType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RecoveryType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RecoveryType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RehydrationPriority.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RehydrationPriority.cs new file mode 100644 index 000000000000..8d29b40eaab0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RehydrationPriority.cs @@ -0,0 +1,98 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Rehydration Priority + public partial struct RehydrationPriority : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority High = @"High"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority Standard = @"Standard"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RehydrationPriority + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RehydrationPriority(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RehydrationPriority + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RehydrationPriority (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RehydrationPriority && Equals((RehydrationPriority)obj); + } + + /// Returns hashCode for enum RehydrationPriority + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RehydrationPriority(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RehydrationPriority + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RehydrationPriority + /// the value to convert to an instance of . + + public static implicit operator RehydrationPriority(string value) + { + return new RehydrationPriority(value); + } + + /// Implicit operator to convert RehydrationPriority to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority e) + { + return e._value; + } + + /// Overriding != operator for enum RehydrationPriority + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RehydrationPriority + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RehydrationPriority e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ResourceHealthStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ResourceHealthStatus.cs new file mode 100644 index 000000000000..a676835b110a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ResourceHealthStatus.cs @@ -0,0 +1,106 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Resource Health Status + public partial struct ResourceHealthStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus Healthy = @"Healthy"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus PersistentDegraded = @"PersistentDegraded"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus PersistentUnhealthy = @"PersistentUnhealthy"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus TransientDegraded = @"TransientDegraded"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus TransientUnhealthy = @"TransientUnhealthy"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ResourceHealthStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ResourceHealthStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ResourceHealthStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ResourceHealthStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ResourceHealthStatus && Equals((ResourceHealthStatus)obj); + } + + /// Returns hashCode for enum ResourceHealthStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ResourceHealthStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ResourceHealthStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ResourceHealthStatus + /// the value to convert to an instance of . + + public static implicit operator ResourceHealthStatus(string value) + { + return new ResourceHealthStatus(value); + } + + /// Implicit operator to convert ResourceHealthStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus e) + { + return e._value; + } + + /// Overriding != operator for enum ResourceHealthStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ResourceHealthStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ResourceHealthStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RestorePointQueryType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RestorePointQueryType.cs new file mode 100644 index 000000000000..588c7b7f71d2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RestorePointQueryType.cs @@ -0,0 +1,112 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// RestorePoint type + public partial struct RestorePointQueryType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType All = @"All"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType Differential = @"Differential"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType Full = @"Full"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType FullAndDifferential = @"FullAndDifferential"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType Incremental = @"Incremental"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType Log = @"Log"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType SnapshotCopyOnlyFull = @"SnapshotCopyOnlyFull"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType SnapshotFull = @"SnapshotFull"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RestorePointQueryType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RestorePointQueryType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RestorePointQueryType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RestorePointQueryType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RestorePointQueryType && Equals((RestorePointQueryType)obj); + } + + /// Returns hashCode for enum RestorePointQueryType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RestorePointQueryType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RestorePointQueryType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RestorePointQueryType + /// the value to convert to an instance of . + + public static implicit operator RestorePointQueryType(string value) + { + return new RestorePointQueryType(value); + } + + /// Implicit operator to convert RestorePointQueryType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType e) + { + return e._value; + } + + /// Overriding != operator for enum RestorePointQueryType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RestorePointQueryType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointQueryType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RestorePointType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RestorePointType.cs new file mode 100644 index 000000000000..66ebab72ead3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RestorePointType.cs @@ -0,0 +1,108 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of restore point + public partial struct RestorePointType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType Differential = @"Differential"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType Full = @"Full"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType Incremental = @"Incremental"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType Log = @"Log"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType SnapshotCopyOnlyFull = @"SnapshotCopyOnlyFull"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType SnapshotFull = @"SnapshotFull"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RestorePointType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RestorePointType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RestorePointType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RestorePointType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RestorePointType && Equals((RestorePointType)obj); + } + + /// Returns hashCode for enum RestorePointType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RestorePointType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RestorePointType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RestorePointType + /// the value to convert to an instance of . + + public static implicit operator RestorePointType(string value) + { + return new RestorePointType(value); + } + + /// Implicit operator to convert RestorePointType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType e) + { + return e._value; + } + + /// Overriding != operator for enum RestorePointType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RestorePointType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestorePointType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RestoreRequestType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RestoreRequestType.cs new file mode 100644 index 000000000000..d18dc557171b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RestoreRequestType.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Restore Type (FullShareRestore or ItemLevelRestore) + public partial struct RestoreRequestType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType FullShareRestore = @"FullShareRestore"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType ItemLevelRestore = @"ItemLevelRestore"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RestoreRequestType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RestoreRequestType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RestoreRequestType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RestoreRequestType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RestoreRequestType && Equals((RestoreRequestType)obj); + } + + /// Returns hashCode for enum RestoreRequestType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RestoreRequestType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RestoreRequestType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RestoreRequestType + /// the value to convert to an instance of . + + public static implicit operator RestoreRequestType(string value) + { + return new RestoreRequestType(value); + } + + /// Implicit operator to convert RestoreRequestType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType e) + { + return e._value; + } + + /// Overriding != operator for enum RestoreRequestType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RestoreRequestType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RestoreRequestType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RetentionDurationType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RetentionDurationType.cs new file mode 100644 index 000000000000..ad9a0755ed5c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RetentionDurationType.cs @@ -0,0 +1,104 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Retention duration type of retention policy. + public partial struct RetentionDurationType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType Days = @"Days"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType Months = @"Months"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType Weeks = @"Weeks"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType Years = @"Years"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RetentionDurationType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RetentionDurationType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RetentionDurationType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RetentionDurationType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RetentionDurationType && Equals((RetentionDurationType)obj); + } + + /// Returns hashCode for enum RetentionDurationType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RetentionDurationType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RetentionDurationType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RetentionDurationType + /// the value to convert to an instance of . + + public static implicit operator RetentionDurationType(string value) + { + return new RetentionDurationType(value); + } + + /// Implicit operator to convert RetentionDurationType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType e) + { + return e._value; + } + + /// Overriding != operator for enum RetentionDurationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RetentionDurationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionDurationType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RetentionScheduleFormat.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RetentionScheduleFormat.cs new file mode 100644 index 000000000000..1b8d6dcf015a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/RetentionScheduleFormat.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Retention schedule format type for monthly retention policy. + public partial struct RetentionScheduleFormat : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat Daily = @"Daily"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat Weekly = @"Weekly"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RetentionScheduleFormat + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RetentionScheduleFormat(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RetentionScheduleFormat + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RetentionScheduleFormat (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RetentionScheduleFormat && Equals((RetentionScheduleFormat)obj); + } + + /// Returns hashCode for enum RetentionScheduleFormat + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RetentionScheduleFormat(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RetentionScheduleFormat + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RetentionScheduleFormat + /// the value to convert to an instance of . + + public static implicit operator RetentionScheduleFormat(string value) + { + return new RetentionScheduleFormat(value); + } + + /// Implicit operator to convert RetentionScheduleFormat to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat e) + { + return e._value; + } + + /// Overriding != operator for enum RetentionScheduleFormat + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RetentionScheduleFormat + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.RetentionScheduleFormat e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ScheduleRunType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ScheduleRunType.cs new file mode 100644 index 000000000000..92100a0239e9 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ScheduleRunType.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Frequency of the schedule operation of this policy. + public partial struct ScheduleRunType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType Daily = @"Daily"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType Hourly = @"Hourly"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType Weekly = @"Weekly"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ScheduleRunType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ScheduleRunType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ScheduleRunType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ScheduleRunType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ScheduleRunType && Equals((ScheduleRunType)obj); + } + + /// Returns hashCode for enum ScheduleRunType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ScheduleRunType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ScheduleRunType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ScheduleRunType + /// the value to convert to an instance of . + + public static implicit operator ScheduleRunType(string value) + { + return new ScheduleRunType(value); + } + + /// Implicit operator to convert ScheduleRunType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType e) + { + return e._value; + } + + /// Overriding != operator for enum ScheduleRunType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ScheduleRunType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ScheduleRunType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/SoftDeleteFeatureState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/SoftDeleteFeatureState.cs new file mode 100644 index 000000000000..98e62281e936 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/SoftDeleteFeatureState.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Soft Delete feature state + public partial struct SoftDeleteFeatureState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState AlwaysOn = @"AlwaysON"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState Enabled = @"Enabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState Invalid = @"Invalid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SoftDeleteFeatureState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SoftDeleteFeatureState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SoftDeleteFeatureState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SoftDeleteFeatureState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SoftDeleteFeatureState && Equals((SoftDeleteFeatureState)obj); + } + + /// Returns hashCode for enum SoftDeleteFeatureState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SoftDeleteFeatureState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SoftDeleteFeatureState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SoftDeleteFeatureState + /// the value to convert to an instance of . + + public static implicit operator SoftDeleteFeatureState(string value) + { + return new SoftDeleteFeatureState(value); + } + + /// Implicit operator to convert SoftDeleteFeatureState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState e) + { + return e._value; + } + + /// Overriding != operator for enum SoftDeleteFeatureState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SoftDeleteFeatureState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SoftDeleteFeatureState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/SqlDataDirectoryType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/SqlDataDirectoryType.cs new file mode 100644 index 000000000000..f12e8117f0dc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/SqlDataDirectoryType.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of data directory mapping + public partial struct SqlDataDirectoryType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType Data = @"Data"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType Log = @"Log"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SqlDataDirectoryType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SqlDataDirectoryType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SqlDataDirectoryType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SqlDataDirectoryType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SqlDataDirectoryType && Equals((SqlDataDirectoryType)obj); + } + + /// Returns hashCode for enum SqlDataDirectoryType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SqlDataDirectoryType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SqlDataDirectoryType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SqlDataDirectoryType + /// the value to convert to an instance of . + + public static implicit operator SqlDataDirectoryType(string value) + { + return new SqlDataDirectoryType(value); + } + + /// Implicit operator to convert SqlDataDirectoryType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType e) + { + return e._value; + } + + /// Overriding != operator for enum SqlDataDirectoryType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SqlDataDirectoryType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SqlDataDirectoryType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/StorageType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/StorageType.cs new file mode 100644 index 000000000000..9dacf1e50c69 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/StorageType.cs @@ -0,0 +1,104 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Storage type + public partial struct StorageType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType GeoRedundant = @"GeoRedundant"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType LocallyRedundant = @"LocallyRedundant"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType ReadAccessGeoZoneRedundant = @"ReadAccessGeoZoneRedundant"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType ZoneRedundant = @"ZoneRedundant"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to StorageType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StorageType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StorageType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type StorageType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StorageType && Equals((StorageType)obj); + } + + /// Returns hashCode for enum StorageType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private StorageType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StorageType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StorageType + /// the value to convert to an instance of . + + public static implicit operator StorageType(string value) + { + return new StorageType(value); + } + + /// Implicit operator to convert StorageType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType e) + { + return e._value; + } + + /// Overriding != operator for enum StorageType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StorageType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/StorageTypeState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/StorageTypeState.cs new file mode 100644 index 000000000000..f23dd179f1a1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/StorageTypeState.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// + /// Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + /// + public partial struct StorageTypeState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState Locked = @"Locked"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState Unlocked = @"Unlocked"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to StorageTypeState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StorageTypeState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StorageTypeState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type StorageTypeState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StorageTypeState && Equals((StorageTypeState)obj); + } + + /// Returns hashCode for enum StorageTypeState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private StorageTypeState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StorageTypeState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StorageTypeState + /// the value to convert to an instance of . + + public static implicit operator StorageTypeState(string value) + { + return new StorageTypeState(value); + } + + /// Implicit operator to convert StorageTypeState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState e) + { + return e._value; + } + + /// Overriding != operator for enum StorageTypeState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StorageTypeState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.StorageTypeState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/SupportStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/SupportStatus.cs new file mode 100644 index 000000000000..39fa5ed857f2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/SupportStatus.cs @@ -0,0 +1,104 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Support status of feature + public partial struct SupportStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus DefaultOff = @"DefaultOFF"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus DefaultOn = @"DefaultON"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus NotSupported = @"NotSupported"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus Supported = @"Supported"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SupportStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SupportStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SupportStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SupportStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SupportStatus && Equals((SupportStatus)obj); + } + + /// Returns hashCode for enum SupportStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SupportStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SupportStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SupportStatus + /// the value to convert to an instance of . + + public static implicit operator SupportStatus(string value) + { + return new SupportStatus(value); + } + + /// Implicit operator to convert SupportStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus e) + { + return e._value; + } + + /// Overriding != operator for enum SupportStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SupportStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.SupportStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/TargetDiskNetworkAccessOption.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/TargetDiskNetworkAccessOption.cs new file mode 100644 index 000000000000..e27945d7ed31 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/TargetDiskNetworkAccessOption.cs @@ -0,0 +1,106 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Network access settings to be used for restored disks + public partial struct TargetDiskNetworkAccessOption : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption EnablePrivateAccessForAllDisks = @"EnablePrivateAccessForAllDisks"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption EnablePublicAccessForAllDisks = @"EnablePublicAccessForAllDisks"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption SameAsOnSourceDisks = @"SameAsOnSourceDisks"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to TargetDiskNetworkAccessOption + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new TargetDiskNetworkAccessOption(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type TargetDiskNetworkAccessOption + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type TargetDiskNetworkAccessOption (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is TargetDiskNetworkAccessOption && Equals((TargetDiskNetworkAccessOption)obj); + } + + /// Returns hashCode for enum TargetDiskNetworkAccessOption + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private TargetDiskNetworkAccessOption(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for TargetDiskNetworkAccessOption + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to TargetDiskNetworkAccessOption + /// the value to convert to an instance of . + + public static implicit operator TargetDiskNetworkAccessOption(string value) + { + return new TargetDiskNetworkAccessOption(value); + } + + /// Implicit operator to convert TargetDiskNetworkAccessOption to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption e) + { + return e._value; + } + + /// Overriding != operator for enum TargetDiskNetworkAccessOption + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum TargetDiskNetworkAccessOption + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TargetDiskNetworkAccessOption e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/TieringMode.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/TieringMode.cs new file mode 100644 index 000000000000..94680e02ece2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/TieringMode.cs @@ -0,0 +1,107 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// + /// Tiering Mode to control automatic tiering of recovery points. Supported values are: + /// 1. TierRecommended: Tier all recovery points recommended to be tiered + /// 2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below. + /// 3. DoNotTier: Do not tier any recovery points + /// + public partial struct TieringMode : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode DoNotTier = @"DoNotTier"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode TierAfter = @"TierAfter"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode TierRecommended = @"TierRecommended"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to TieringMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new TieringMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type TieringMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type TieringMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is TieringMode && Equals((TieringMode)obj); + } + + /// Returns hashCode for enum TieringMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private TieringMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for TieringMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to TieringMode + /// the value to convert to an instance of . + + public static implicit operator TieringMode(string value) + { + return new TieringMode(value); + } + + /// Implicit operator to convert TieringMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode e) + { + return e._value; + } + + /// Overriding != operator for enum TieringMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum TieringMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.TieringMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/Type.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/Type.cs new file mode 100644 index 000000000000..eb1b468b6348 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/Type.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Backup management type for this container. + public partial struct Type : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type BackupProtectedItemCountSummary = @"BackupProtectedItemCountSummary"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type BackupProtectionContainerCountSummary = @"BackupProtectionContainerCountSummary"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type Invalid = @"Invalid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Type + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Type(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Type + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Type (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Type && Equals((Type)obj); + } + + /// Returns hashCode for enum Type + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for Type + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Type(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to Type + /// the value to convert to an instance of . + + public static implicit operator Type(string value) + { + return new Type(value); + } + + /// Implicit operator to convert Type to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type e) + { + return e._value; + } + + /// Overriding != operator for enum Type + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Type + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.Type e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/UsagesUnit.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/UsagesUnit.cs new file mode 100644 index 000000000000..c42504db1ce4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/UsagesUnit.cs @@ -0,0 +1,106 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Unit of the usage. + public partial struct UsagesUnit : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit Bytes = @"Bytes"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit BytesPerSecond = @"BytesPerSecond"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit Count = @"Count"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit CountPerSecond = @"CountPerSecond"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit Percent = @"Percent"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit Seconds = @"Seconds"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to UsagesUnit + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new UsagesUnit(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type UsagesUnit + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type UsagesUnit (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is UsagesUnit && Equals((UsagesUnit)obj); + } + + /// Returns hashCode for enum UsagesUnit + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for UsagesUnit + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private UsagesUnit(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to UsagesUnit + /// the value to convert to an instance of . + + public static implicit operator UsagesUnit(string value) + { + return new UsagesUnit(value); + } + + /// Implicit operator to convert UsagesUnit to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit e) + { + return e._value; + } + + /// Overriding != operator for enum UsagesUnit + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum UsagesUnit + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.UsagesUnit e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ValidationStatus.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ValidationStatus.cs new file mode 100644 index 000000000000..013f11e50ec4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/ValidationStatus.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Validation Status + public partial struct ValidationStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus Succeeded = @"Succeeded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ValidationStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ValidationStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ValidationStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ValidationStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ValidationStatus && Equals((ValidationStatus)obj); + } + + /// Returns hashCode for enum ValidationStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ValidationStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ValidationStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to ValidationStatus + /// the value to convert to an instance of . + + public static implicit operator ValidationStatus(string value) + { + return new ValidationStatus(value); + } + + /// Implicit operator to convert ValidationStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus e) + { + return e._value; + } + + /// Overriding != operator for enum ValidationStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ValidationStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.ValidationStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/VaultSubResourceType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/VaultSubResourceType.cs new file mode 100644 index 000000000000..d05a791a1ca8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/VaultSubResourceType.cs @@ -0,0 +1,102 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// + /// GroupId for the PrivateEndpointConnection - AzureBackup, AzureBackup_secondary or AzureSiteRecovery + /// + public partial struct VaultSubResourceType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType AzureBackup = @"AzureBackup"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType AzureBackupSecondary = @"AzureBackup_secondary"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType AzureSiteRecovery = @"AzureSiteRecovery"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to VaultSubResourceType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new VaultSubResourceType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type VaultSubResourceType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type VaultSubResourceType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is VaultSubResourceType && Equals((VaultSubResourceType)obj); + } + + /// Returns hashCode for enum VaultSubResourceType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for VaultSubResourceType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private VaultSubResourceType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to VaultSubResourceType + /// the value to convert to an instance of . + + public static implicit operator VaultSubResourceType(string value) + { + return new VaultSubResourceType(value); + } + + /// Implicit operator to convert VaultSubResourceType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType e) + { + return e._value; + } + + /// Overriding != operator for enum VaultSubResourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum VaultSubResourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.VaultSubResourceType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/WeekOfMonth.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/WeekOfMonth.cs new file mode 100644 index 000000000000..f599467bfdde --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/WeekOfMonth.cs @@ -0,0 +1,105 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + public partial struct WeekOfMonth : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth First = @"First"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth Fourth = @"Fourth"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth Last = @"Last"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth Second = @"Second"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth Third = @"Third"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WeekOfMonth + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WeekOfMonth(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WeekOfMonth + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WeekOfMonth (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WeekOfMonth && Equals((WeekOfMonth)obj); + } + + /// Returns hashCode for enum WeekOfMonth + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WeekOfMonth + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WeekOfMonth(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WeekOfMonth + /// the value to convert to an instance of . + + public static implicit operator WeekOfMonth(string value) + { + return new WeekOfMonth(value); + } + + /// Implicit operator to convert WeekOfMonth to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth e) + { + return e._value; + } + + /// Overriding != operator for enum WeekOfMonth + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WeekOfMonth + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WeekOfMonth e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/WorkloadItemType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/WorkloadItemType.cs new file mode 100644 index 000000000000..5563d3fad94b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/WorkloadItemType.cs @@ -0,0 +1,110 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Workload item type of the item for which intent is to be set + public partial struct WorkloadItemType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType SapAseDatabase = @"SAPAseDatabase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType SapAseSystem = @"SAPAseSystem"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType SapHanaDatabase = @"SAPHanaDatabase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType SapHanaDbinstance = @"SAPHanaDBInstance"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType SapHanaSystem = @"SAPHanaSystem"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType SqlDataBase = @"SQLDataBase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType SqlInstance = @"SQLInstance"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WorkloadItemType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WorkloadItemType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WorkloadItemType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WorkloadItemType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WorkloadItemType && Equals((WorkloadItemType)obj); + } + + /// Returns hashCode for enum WorkloadItemType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WorkloadItemType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WorkloadItemType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WorkloadItemType + /// the value to convert to an instance of . + + public static implicit operator WorkloadItemType(string value) + { + return new WorkloadItemType(value); + } + + /// Implicit operator to convert WorkloadItemType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType e) + { + return e._value; + } + + /// Overriding != operator for enum WorkloadItemType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WorkloadItemType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadItemType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/WorkloadType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/WorkloadType.cs new file mode 100644 index 000000000000..fe9456ef4889 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/WorkloadType.cs @@ -0,0 +1,126 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Type of workload for the backup management + public partial struct WorkloadType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType AzureFileShare = @"AzureFileShare"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType AzureSqlDb = @"AzureSqlDb"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType Client = @"Client"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType Exchange = @"Exchange"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType FileFolder = @"FileFolder"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType GenericDataSource = @"GenericDataSource"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType SapAseDatabase = @"SAPAseDatabase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType SapHanaDatabase = @"SAPHanaDatabase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType SapHanaDbinstance = @"SAPHanaDBInstance"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType Sharepoint = @"Sharepoint"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType SqlDataBase = @"SQLDataBase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType Sqldb = @"SQLDB"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType SystemState = @"SystemState"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType VM = @"VM"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType VMwareVM = @"VMwareVM"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WorkloadType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WorkloadType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WorkloadType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WorkloadType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WorkloadType && Equals((WorkloadType)obj); + } + + /// Returns hashCode for enum WorkloadType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WorkloadType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WorkloadType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WorkloadType + /// the value to convert to an instance of . + + public static implicit operator WorkloadType(string value) + { + return new WorkloadType(value); + } + + /// Implicit operator to convert WorkloadType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType e) + { + return e._value; + } + + /// Overriding != operator for enum WorkloadType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WorkloadType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.WorkloadType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/XcoolState.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/XcoolState.cs new file mode 100644 index 000000000000..df42df1e15f2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/api/Support/XcoolState.cs @@ -0,0 +1,100 @@ +// 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.PowerShell.Cmdlets.RecoveryServicesBackup.Support +{ + + /// Vault x-cool state + public partial struct XcoolState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState Enabled = @"Enabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState Invalid = @"Invalid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to XcoolState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new XcoolState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type XcoolState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type XcoolState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is XcoolState && Equals((XcoolState)obj); + } + + /// Returns hashCode for enum XcoolState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for XcoolState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private XcoolState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to XcoolState + /// the value to convert to an instance of . + + public static implicit operator XcoolState(string value) + { + return new XcoolState(value); + } + + /// Implicit operator to convert XcoolState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState e) + { + return e._value; + } + + /// Overriding != operator for enum XcoolState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum XcoolState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState e1, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Support.XcoolState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/CmdInfoHandler.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/CmdInfoHandler.cs new file mode 100644 index 000000000000..02b31b3a58ff --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/CmdInfoHandler.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Management.Automation; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + using NextDelegate = Func, Task>, Task>; + using SignalDelegate = Func, Task>; + + public class CmdInfoHandler + { + private readonly string processRecordId; + private readonly string parameterSetName; + private readonly InvocationInfo invocationInfo; + + public CmdInfoHandler(string processRecordId, InvocationInfo invocationInfo, string parameterSetName) + { + this.processRecordId = processRecordId; + this.parameterSetName = parameterSetName; + this.invocationInfo = invocationInfo; + } + + public Task SendAsync(HttpRequestMessage request, CancellationToken token, Action cancel, SignalDelegate signal, NextDelegate next) + { + request.Headers.Add("x-ms-client-request-id", processRecordId); + request.Headers.Add("CommandName", invocationInfo?.InvocationName); + request.Headers.Add("FullCommandName", invocationInfo?.MyCommand?.Name); + request.Headers.Add("ParameterSetName", parameterSetName); + + // continue with pipeline. + return next(request, token, cancel, signal); + } + } +} diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/ConversionException.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/ConversionException.cs new file mode 100644 index 000000000000..601dfc68aa85 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/ConversionException.cs @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal class ConversionException : Exception + { + internal ConversionException(string message) + : base(message) { } + + internal ConversionException(JsonNode node, Type targetType) + : base($"Cannot convert '{node.Type}' to a {targetType.Name}") { } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/IJsonConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/IJsonConverter.cs new file mode 100644 index 000000000000..88370cf81802 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/IJsonConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal interface IJsonConverter + { + JsonNode ToJson(object value); + + object FromJson(JsonNode node); + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/BinaryConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/BinaryConverter.cs new file mode 100644 index 000000000000..85b0bfbf80f2 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/BinaryConverter.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class BinaryConverter : JsonConverter + { + internal override JsonNode ToJson(byte[] value) => new XBinary(value); + + internal override byte[] FromJson(JsonNode node) + { + switch (node.Type) + { + case JsonType.String : return Convert.FromBase64String(node.ToString()); // Base64 Encoded + case JsonType.Binary : return ((XBinary)node).Value; + } + + throw new ConversionException(node, typeof(byte[])); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/BooleanConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/BooleanConverter.cs new file mode 100644 index 000000000000..3f032481a9aa --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/BooleanConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class BooleanConverter : JsonConverter + { + internal override JsonNode ToJson(bool value) => new JsonBoolean(value); + + internal override bool FromJson(JsonNode node) => (bool)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DateTimeConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DateTimeConverter.cs new file mode 100644 index 000000000000..1ab45d89dcb8 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DateTimeConverter.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class DateTimeConverter : JsonConverter + { + internal override JsonNode ToJson(DateTime value) + { + return new JsonDate(value); + } + + internal override DateTime FromJson(JsonNode node) => (DateTime)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs new file mode 100644 index 000000000000..032472c7f94b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class DateTimeOffsetConverter : JsonConverter + { + internal override JsonNode ToJson(DateTimeOffset value) => new JsonDate(value); + + internal override DateTimeOffset FromJson(JsonNode node) => (DateTimeOffset)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DecimalConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DecimalConverter.cs new file mode 100644 index 000000000000..558bdb42d287 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DecimalConverter.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class DecimalConverter : JsonConverter + { + internal override JsonNode ToJson(decimal value) => new JsonNumber(value.ToString()); + + internal override decimal FromJson(JsonNode node) + { + return (decimal)node; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DoubleConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DoubleConverter.cs new file mode 100644 index 000000000000..32f1bcb4a1b5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/DoubleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class DoubleConverter : JsonConverter + { + internal override JsonNode ToJson(double value) => new JsonNumber(value); + + internal override double FromJson(JsonNode node) => (double)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/EnumConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/EnumConverter.cs new file mode 100644 index 000000000000..c9d9a8878b39 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/EnumConverter.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class EnumConverter : IJsonConverter + { + private readonly Type type; + + internal EnumConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + } + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + + public object FromJson(JsonNode node) + { + if (node.Type == JsonType.Number) + { + return Enum.ToObject(type, (int)node); + } + + return Enum.Parse(type, node.ToString(), ignoreCase: true); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/GuidConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/GuidConverter.cs new file mode 100644 index 000000000000..1e47b9452374 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/GuidConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class GuidConverter : JsonConverter + { + internal override JsonNode ToJson(Guid value) => new JsonString(value.ToString()); + + internal override Guid FromJson(JsonNode node) => (Guid)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/HashSet'1Converter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/HashSet'1Converter.cs new file mode 100644 index 000000000000..c3f6e32c2eca --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/HashSet'1Converter.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class HashSetConverter : JsonConverter> + { + internal override JsonNode ToJson(HashSet value) + { + return new XSet(value); + } + + internal override HashSet FromJson(JsonNode node) + { + var collection = node as ICollection; + + if (collection.Count == 0) return null; + + // TODO: Remove Linq depedency + return new HashSet(collection.Cast()); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/Int16Converter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/Int16Converter.cs new file mode 100644 index 000000000000..9a139aa93872 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/Int16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class Int16Converter : JsonConverter + { + internal override JsonNode ToJson(short value) => new JsonNumber(value); + + internal override short FromJson(JsonNode node) => (short)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/Int32Converter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/Int32Converter.cs new file mode 100644 index 000000000000..c4889d343f16 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/Int32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class Int32Converter : JsonConverter + { + internal override JsonNode ToJson(int value) => new JsonNumber(value); + + internal override int FromJson(JsonNode node) => (int)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/Int64Converter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/Int64Converter.cs new file mode 100644 index 000000000000..23558742dc15 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/Int64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class Int64Converter : JsonConverter + { + internal override JsonNode ToJson(long value) => new JsonNumber(value); + + internal override long FromJson(JsonNode node) => (long)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/JsonArrayConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/JsonArrayConverter.cs new file mode 100644 index 000000000000..e05c0daf2823 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/JsonArrayConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class JsonArrayConverter : JsonConverter + { + internal override JsonNode ToJson(JsonArray value) => value; + + internal override JsonArray FromJson(JsonNode node) => (JsonArray)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/JsonObjectConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/JsonObjectConverter.cs new file mode 100644 index 000000000000..7dd9c0364c1f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/JsonObjectConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class JsonObjectConverter : JsonConverter + { + internal override JsonNode ToJson(JsonObject value) => value; + + internal override JsonObject FromJson(JsonNode node) => (JsonObject)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/SingleConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/SingleConverter.cs new file mode 100644 index 000000000000..905bababf0d0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/SingleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class SingleConverter : JsonConverter + { + internal override JsonNode ToJson(float value) => new JsonNumber(value.ToString()); + + internal override float FromJson(JsonNode node) => (float)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/StringConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/StringConverter.cs new file mode 100644 index 000000000000..f135dd36ed65 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/StringConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class StringConverter : JsonConverter + { + internal override JsonNode ToJson(string value) => new JsonString(value); + + internal override string FromJson(JsonNode node) => node.ToString(); + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/TimeSpanConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/TimeSpanConverter.cs new file mode 100644 index 000000000000..a306d14ebc34 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/TimeSpanConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class TimeSpanConverter : JsonConverter + { + internal override JsonNode ToJson(TimeSpan value) => new JsonString(value.ToString()); + + internal override TimeSpan FromJson(JsonNode node) => (TimeSpan)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UInt16Converter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UInt16Converter.cs new file mode 100644 index 000000000000..3f9ca1ff7851 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UInt16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class UInt16Converter : JsonConverter + { + internal override JsonNode ToJson(ushort value) => new JsonNumber(value); + + internal override ushort FromJson(JsonNode node) => (ushort)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UInt32Converter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UInt32Converter.cs new file mode 100644 index 000000000000..eb534d9072ff --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UInt32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class UInt32Converter : JsonConverter + { + internal override JsonNode ToJson(uint value) => new JsonNumber(value); + + internal override uint FromJson(JsonNode node) => (uint)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UInt64Converter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UInt64Converter.cs new file mode 100644 index 000000000000..51e887291522 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UInt64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class UInt64Converter : JsonConverter + { + internal override JsonNode ToJson(ulong value) => new JsonNumber(value.ToString()); + + internal override ulong FromJson(JsonNode node) => (ulong)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UriConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UriConverter.cs new file mode 100644 index 000000000000..5f7070b01625 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/Instances/UriConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class UriConverter : JsonConverter + { + internal override JsonNode ToJson(Uri value) => new JsonString(value.AbsoluteUri); + + internal override Uri FromJson(JsonNode node) => (Uri)node; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/JsonConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/JsonConverter.cs new file mode 100644 index 000000000000..5c4e0f41d6b5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/JsonConverter.cs @@ -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. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public abstract class JsonConverter : IJsonConverter + { + internal abstract T FromJson(JsonNode node); + + internal abstract JsonNode ToJson(T value); + + #region IConverter + + object IJsonConverter.FromJson(JsonNode node) => FromJson(node); + + JsonNode IJsonConverter.ToJson(object value) => ToJson((T)value); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/JsonConverterAttribute.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/JsonConverterAttribute.cs new file mode 100644 index 000000000000..c355ba95e87d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/JsonConverterAttribute.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class JsonConverterAttribute : Attribute + { + internal JsonConverterAttribute(Type type) + { + Converter = (IJsonConverter)Activator.CreateInstance(type); + } + + internal IJsonConverter Converter { get; } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/JsonConverterFactory.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/JsonConverterFactory.cs new file mode 100644 index 000000000000..10c850fdfae0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/JsonConverterFactory.cs @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class JsonConverterFactory + { + private static readonly Dictionary converters = new Dictionary(); + + static JsonConverterFactory() + { + AddInternal(new BooleanConverter()); + AddInternal(new DateTimeConverter()); + AddInternal(new DateTimeOffsetConverter()); + AddInternal(new BinaryConverter()); + AddInternal(new DecimalConverter()); + AddInternal(new DoubleConverter()); + AddInternal(new GuidConverter()); + AddInternal(new Int16Converter()); + AddInternal(new Int32Converter()); + AddInternal(new Int64Converter()); + AddInternal(new SingleConverter()); + AddInternal(new StringConverter()); + AddInternal(new TimeSpanConverter()); + AddInternal(new UInt16Converter()); + AddInternal(new UInt32Converter()); + AddInternal(new UInt64Converter()); + AddInternal(new UriConverter()); + + // Hash sets + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + + // JSON + + AddInternal(new JsonObjectConverter()); + AddInternal(new JsonArrayConverter()); + } + + internal static Dictionary Instances => converters; + + internal static IJsonConverter Get(Type type) + { + var details = TypeDetails.Get(type); + + if (details.JsonConverter == null) + { + throw new ConversionException($"No converter found for '{type.Name}'."); + } + + return details.JsonConverter; + } + + internal static bool TryGet(Type type, out IJsonConverter converter) + { + var typeDetails = TypeDetails.Get(type); + + converter = typeDetails.JsonConverter; + + return converter != null; + } + + private static void AddInternal(JsonConverter converter) + => converters.Add(typeof(T), converter); + + private static void AddInternal(IJsonConverter converter) + => converters.Add(typeof(T), converter); + + internal static void Add(JsonConverter converter) + { + if (converter == null) + { + throw new ArgumentNullException(nameof(converter)); + } + + AddInternal(converter); + + var type = TypeDetails.Get(); + + type.JsonConverter = converter; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/StringLikeConverter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/StringLikeConverter.cs new file mode 100644 index 000000000000..bf01338ebc67 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Conversions/StringLikeConverter.cs @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class StringLikeConverter : IJsonConverter + { + private readonly Type type; + private readonly MethodInfo parseMethod; + + internal StringLikeConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + this.parseMethod = StringLikeHelper.GetParseMethod(type); + } + + public object FromJson(JsonNode node) => + parseMethod.Invoke(null, new[] { node.ToString() }); + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + } + + internal static class StringLikeHelper + { + private static readonly Type[] parseMethodParamaterTypes = new[] { typeof(string) }; + + internal static bool IsStringLike(Type type) + { + return GetParseMethod(type) != null; + } + + internal static MethodInfo GetParseMethod(Type type) + { + MethodInfo method = type.GetMethod("Parse", parseMethodParamaterTypes); + + if (method?.IsPublic != true) return null; + + return method; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/IJsonSerializable.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/IJsonSerializable.cs new file mode 100644 index 000000000000..7735a7abf027 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/IJsonSerializable.cs @@ -0,0 +1,263 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json; +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + public interface IJsonSerializable + { + JsonNode ToJson(JsonObject container = null, SerializationMode serializationMode = SerializationMode.None); + } + internal static class JsonSerializable + { + /// + /// Serializes an enumerable and returns a JsonNode. + /// + /// an IEnumerable collection of items + /// A JsonNode that contains the collection of items serialized. + private static JsonNode ToJsonValue(System.Collections.IEnumerable enumerable) + { + if (enumerable != null) + { + // is it a byte array of some kind? + if (enumerable is System.Collections.Generic.IEnumerable byteEnumerable) + { + return new XBinary(System.Linq.Enumerable.ToArray(byteEnumerable)); + } + + var hasValues = false; + // just create an array of value nodes. + var result = new XNodeArray(); + foreach (var each in enumerable) + { + // we had at least one value. + hasValues = true; + + // try to serialize it. + var node = ToJsonValue(each); + if (null != node) + { + result.Add(node); + } + } + + // if we were able to add values, (or it was just empty), return it. + if (result.Count > 0 || !hasValues) + { + return result; + } + } + + // we couldn't serialize the values. Sorry. + return null; + } + + /// + /// Serializes a valuetype to a JsonNode. + /// + /// a ValueType (ie, a primitive, enum or struct) to be serialized + /// a JsonNode with the serialized value + private static JsonNode ToJsonValue(ValueType vValue) + { + // numeric type + if (vValue is SByte || vValue is Int16 || vValue is Int32 || vValue is Int64 || vValue is Byte || vValue is UInt16 || vValue is UInt32 || vValue is UInt64 || vValue is decimal || vValue is float || vValue is double) + { + return new JsonNumber(vValue.ToString()); + } + + // boolean type + if (vValue is bool bValue) + { + return new JsonBoolean(bValue); + } + + // dates + if (vValue is DateTime dtValue) + { + return new JsonDate(dtValue); + } + + // DictionaryEntity struct type + if (vValue is System.Collections.DictionaryEntry deValue) + { + return new JsonObject { { deValue.Key.ToString(), ToJsonValue(deValue.Value) } }; + } + + // sorry, no idea. + return null; + } + /// + /// Attempts to serialize an object by using ToJson() or ToJsonString() if they exist. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + private static JsonNode TryToJsonValue(dynamic oValue) + { + object jsonValue = null; + dynamic v = oValue; + try + { + jsonValue = v.ToJson().ToString(); + } + catch + { + // no harm... + try + { + jsonValue = v.ToJsonString().ToString(); + } + catch + { + // no worries here either. + } + } + + // if we got something out, let's use it. + if (null != jsonValue) + { + // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? + return new JsonNumber(jsonValue.ToString()); + } + + return null; + } + + /// + /// Serialize an object by using a variety of methods. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + internal static JsonNode ToJsonValue(object value) + { + // things that implement our interface are preferred. + if (value is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable jsonSerializable) + { + return jsonSerializable.ToJson(); + } + + // strings are easy. + if (value is string || value is char) + { + return new JsonString(value.ToString()); + } + + // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) + if (value is System.ValueType vValue) + { + return ToJsonValue(vValue) ?? TryToJsonValue(vValue) ?? new JsonString(vValue.ToString()); + } + + // dictionaries are objects that should be able to serialize + if (value is System.Collections.Generic.IDictionary dictionary) + { + return Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson(dictionary, null); + } + + // hashtables are converted to dictionaries for serialization + if (value is System.Collections.Hashtable hashtable) + { + var dict = new System.Collections.Generic.Dictionary(); + DictionaryExtensions.HashTableToDictionary(hashtable, dict); + return Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.ToJson(dict, null); + } + + // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) + if (value is System.Collections.IEnumerable enumerableValue) + { + // some kind of enumerable value + return ToJsonValue(enumerableValue) ?? TryToJsonValue(value) ?? new JsonString(value.ToString()); + } + + // at this point, we're going to fallback to a string literal here, since we really have no idea what it is. + return new JsonString(value.ToString()); + } + + internal static JsonObject ToJson(System.Collections.Generic.Dictionary dictionary, JsonObject container) => ToJson((System.Collections.Generic.IDictionary)dictionary, container); + + /// + /// Serializes a dictionary into a JsonObject container. + /// + /// The dictionary to serailize + /// the container to serialize the dictionary into + /// the container + internal static JsonObject ToJson(System.Collections.Generic.IDictionary dictionary, JsonObject container) + { + container = container ?? new JsonObject(); + if (dictionary != null && dictionary.Count > 0) + { + foreach (var key in dictionary) + { + // currently, we don't serialize null values. + if (null != key.Value) + { + container.Add(key.Key, ToJsonValue(key.Value)); + continue; + } + } + } + return container; + } + + internal static Func> DeserializeDictionary(Func> dictionaryFactory) + { + return (node) => FromJson(node, dictionaryFactory(), (object)(DeserializeDictionary(dictionaryFactory)) as Func); + } + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.Dictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) => FromJson(json, (System.Collections.Generic.IDictionary)container, objectFactory, excludes); + + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.IDictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) + { + if (null == json) + { + return container; + } + + foreach (var key in json.Keys) + { + if (true == excludes?.Contains(key)) + { + continue; + } + + var value = json[key]; + try + { + switch (value.Type) + { + case JsonType.Null: + // skip null values. + continue; + + case JsonType.Array: + case JsonType.Boolean: + case JsonType.Date: + case JsonType.Binary: + case JsonType.Number: + case JsonType.String: + container.Add(key, (V)value.ToValue()); + break; + case JsonType.Object: + if (objectFactory != null) + { + var v = objectFactory(value as JsonObject); + if (null != v) + { + container.Add(key, v); + } + } + break; + } + } + catch + { + } + } + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonArray.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonArray.cs new file mode 100644 index 000000000000..659ef466b80e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonArray.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public partial class JsonArray + { + internal override object ToValue() => Count == 0 ? new object[0] : System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(this, each => each.ToValue())); + } + + +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonBoolean.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonBoolean.cs new file mode 100644 index 000000000000..2b41e3ac0484 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonBoolean.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal partial class JsonBoolean + { + internal static JsonBoolean Create(bool? value) => value is bool b ? new JsonBoolean(b) : null; + internal bool ToBoolean() => Value; + + internal override object ToValue() => Value; + } + + +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonNode.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonNode.cs new file mode 100644 index 000000000000..39d105818e66 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonNode.cs @@ -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. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonNode + { + /// + /// Returns the content of this node as the underlying value. + /// Will default to the string representation if not overridden in child classes. + /// + /// an object with the underlying value of the node. + internal virtual object ToValue() { + return this.ToString(); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonNumber.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonNumber.cs new file mode 100644 index 000000000000..583ee4d3a3ed --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonNumber.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + using System; + + public partial class JsonNumber + { + internal static readonly DateTime EpochDate = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + private static long ToUnixTime(DateTime dateTime) + { + return (long)dateTime.Subtract(EpochDate).TotalSeconds; + } + private static DateTime FromUnixTime(long totalSeconds) + { + return EpochDate.AddSeconds(totalSeconds); + } + internal byte ToByte() => this; + internal int ToInt() => this; + internal long ToLong() => this; + internal short ToShort() => this; + internal UInt16 ToUInt16() => this; + internal UInt32 ToUInt32() => this; + internal UInt64 ToUInt64() => this; + internal decimal ToDecimal() => this; + internal double ToDouble() => this; + internal float ToFloat() => this; + + internal static JsonNumber Create(int? value) => value is int n ? new JsonNumber(n) : null; + internal static JsonNumber Create(long? value) => value is long n ? new JsonNumber(n) : null; + internal static JsonNumber Create(float? value) => value is float n ? new JsonNumber(n) : null; + internal static JsonNumber Create(double? value) => value is double n ? new JsonNumber(n) : null; + internal static JsonNumber Create(decimal? value) => value is decimal n ? new JsonNumber(n) : null; + internal static JsonNumber Create(DateTime? value) => value is DateTime date ? new JsonNumber(ToUnixTime(date)) : null; + + public static implicit operator DateTime(JsonNumber number) => FromUnixTime(number); + internal DateTime ToDateTime() => this; + + internal JsonNumber(decimal value) + { + this.value = value.ToString(); + } + internal override object ToValue() + { + if (IsInteger) + { + if (int.TryParse(this.value, out int iValue)) + { + return iValue; + } + if (long.TryParse(this.value, out long lValue)) + { + return lValue; + } + } + else + { + if (float.TryParse(this.value, out float fValue)) + { + return fValue; + } + if (double.TryParse(this.value, out double dValue)) + { + return dValue; + } + if (decimal.TryParse(this.value, out decimal dcValue)) + { + return dcValue; + } + } + return null; + } + } + + +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonObject.cs new file mode 100644 index 000000000000..30185d16fb0b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonObject.cs @@ -0,0 +1,183 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonObject + { + internal override object ToValue() => Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.JsonSerializable.FromJson(this, new System.Collections.Generic.Dictionary(), (obj) => obj.ToValue()); + + internal void SafeAdd(string name, Func valueFn) + { + if (valueFn != null) + { + var value = valueFn(); + if (null != value) + { + items.Add(name, value); + } + } + } + + internal void SafeAdd(string name, JsonNode value) + { + if (null != value) + { + items.Add(name, value); + } + } + + internal T NullableProperty(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; + } + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + //throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal JsonObject Property(string propertyName) + { + return PropertyT(propertyName); + } + + internal T PropertyT(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; // we're going to assume that the consumer knows what to do if null is explicity returned? + } + + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + // throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal int NumberProperty(string propertyName, ref int output) => output = this.PropertyT(propertyName)?.ToInt() ?? output; + internal float NumberProperty(string propertyName, ref float output) => output = this.PropertyT(propertyName)?.ToFloat() ?? output; + internal byte NumberProperty(string propertyName, ref byte output) => output = this.PropertyT(propertyName)?.ToByte() ?? output; + internal long NumberProperty(string propertyName, ref long output) => output = this.PropertyT(propertyName)?.ToLong() ?? output; + internal double NumberProperty(string propertyName, ref double output) => output = this.PropertyT(propertyName)?.ToDouble() ?? output; + internal decimal NumberProperty(string propertyName, ref decimal output) => output = this.PropertyT(propertyName)?.ToDecimal() ?? output; + internal short NumberProperty(string propertyName, ref short output) => output = this.PropertyT(propertyName)?.ToShort() ?? output; + internal DateTime NumberProperty(string propertyName, ref DateTime output) => output = this.PropertyT(propertyName)?.ToDateTime() ?? output; + + internal int? NumberProperty(string propertyName, ref int? output) => output = this.NullableProperty(propertyName)?.ToInt() ?? null; + internal float? NumberProperty(string propertyName, ref float? output) => output = this.NullableProperty(propertyName)?.ToFloat() ?? null; + internal byte? NumberProperty(string propertyName, ref byte? output) => output = this.NullableProperty(propertyName)?.ToByte() ?? null; + internal long? NumberProperty(string propertyName, ref long? output) => output = this.NullableProperty(propertyName)?.ToLong() ?? null; + internal double? NumberProperty(string propertyName, ref double? output) => output = this.NullableProperty(propertyName)?.ToDouble() ?? null; + internal decimal? NumberProperty(string propertyName, ref decimal? output) => output = this.NullableProperty(propertyName)?.ToDecimal() ?? null; + internal short? NumberProperty(string propertyName, ref short? output) => output = this.NullableProperty(propertyName)?.ToShort() ?? null; + + internal DateTime? NumberProperty(string propertyName, ref DateTime? output) => output = this.NullableProperty(propertyName)?.ToDateTime() ?? null; + + + internal string StringProperty(string propertyName) => this.PropertyT(propertyName)?.ToString(); + internal string StringProperty(string propertyName, ref string output) => output = this.PropertyT(propertyName)?.ToString() ?? output; + internal char StringProperty(string propertyName, ref char output) => output = this.PropertyT(propertyName)?.ToChar() ?? output; + internal char? StringProperty(string propertyName, ref char? output) => output = this.PropertyT(propertyName)?.ToChar() ?? null; + + internal DateTime StringProperty(string propertyName, ref DateTime output) => DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out output) ? output : output; + internal DateTime? StringProperty(string propertyName, ref DateTime? output) => output = DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out var o) ? o : output; + + + internal bool BooleanProperty(string propertyName, ref bool output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? output; + internal bool? BooleanProperty(string propertyName, ref bool? output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? null; + + internal T[] ArrayProperty(string propertyName, ref T[] output, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + } + return output; + } + internal T[] ArrayProperty(string propertyName, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + var output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + return output; + } + return new T[0]; + } + internal void IterateArrayProperty(string propertyName, Action deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + for (var i = 0; i < array.Count; i++) + { + deserializer(array[i]); + } + } + } + + internal Dictionary DictionaryProperty(string propertyName, ref Dictionary output, Func deserializer) + { + var dictionary = this.PropertyT(propertyName); + if (output == null) + { + output = new Dictionary(); + } + else + { + output.Clear(); + } + if (dictionary != null) + { + foreach (var key in dictionary.Keys) + { + output[key] = deserializer(dictionary[key]); + } + } + return output; + } + + internal static JsonObject Create(IDictionary source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new JsonObject(); + + foreach (var key in source.Keys) + { + result.SafeAdd(key, selector(source[key])); + } + return result; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonString.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonString.cs new file mode 100644 index 000000000000..7bd61b812c2f --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/JsonString.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + using System; + using System.Globalization; + using System.Linq; + + public partial class JsonString + { + internal static string DateFormat = "yyyy-MM-dd"; + internal static string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; + internal static string DateTimeRfc1123Format = "R"; + + internal static JsonString Create(string value) => value == null ? null : new JsonString(value); + internal static JsonString Create(char? value) => value is char c ? new JsonString(c.ToString()) : null; + + internal static JsonString CreateDate(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTime(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTimeRfc1123(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeRfc1123Format, CultureInfo.CurrentCulture)) : null; + + internal char ToChar() => this.Value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char(JsonString value) => value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char? (JsonString value) => value?.ToString()?.FirstOrDefault(); + + public static implicit operator DateTime(JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime); + public static implicit operator DateTime? (JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime?); + + } + + +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/XNodeArray.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/XNodeArray.cs new file mode 100644 index 000000000000..a92c50478052 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Customizations/XNodeArray.cs @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + using System; + using System.Linq; + + public partial class XNodeArray + { + internal static XNodeArray Create(T[] source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new XNodeArray(); + foreach (var item in source.Select(selector)) + { + result.SafeAdd(item); + } + return result; + } + internal void SafeAdd(JsonNode item) + { + if (item != null) + { + items.Add(item); + } + } + internal void SafeAdd(Func itemFn) + { + if (itemFn != null) + { + var item = itemFn(); + if (item != null) + { + items.Add(item); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/EventData.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/EventData.cs new file mode 100644 index 000000000000..8263d93268fc --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/EventData.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + + using System; + using System.Threading; + + ///Represents the data in signaled event. + public partial class EventData + { + /// + /// The type of the event being signaled + /// + public string Id; + + /// + /// The user-ready message from the event. + /// + public string Message; + + /// + /// When the event is about a parameter, this is the parameter name. + /// Used in Validation Events + /// + public string Parameter; + + /// + /// This represents a numeric value associated with the event. + /// Use for progress-style events + /// + public double Value; + + /// + /// Any extended data for an event should be serialized and stored here. + /// + public string ExtendedData; + + /// + /// If the event triggers after the request message has been created, this will contain the Request Message (which in HTTP calls would be HttpRequestMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.RequestMessgae is HttpRequestMessage httpRequest) + /// { + /// httpRequest.Headers.Add("x-request-flavor", "vanilla"); + /// } + /// + /// + public object RequestMessage; + + /// + /// If the event triggers after the response is back, this will contain the Response Message (which in HTTP calls would be HttpResponseMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.ResponseMessage is HttpResponseMessage httpResponse){ + /// var flavor = httpResponse.Headers.GetValue("x-request-flavor"); + /// } + /// + /// + public object ResponseMessage; + + /// + /// Cancellation method for this event. + /// + /// If the event consumer wishes to cancel the request that initiated this event, call Cancel() + /// + /// + /// The original initiator of the request must provide the implementation of this. + /// + public System.Action Cancel; + } + +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/EventListener.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/EventListener.cs new file mode 100644 index 000000000000..3bbea926faad --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/EventListener.cs @@ -0,0 +1,247 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public interface IValidates + { + Task Validate(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IEventListener listener); + } + + /// + /// The IEventListener Interface defines the communication mechanism for Signaling events during a remote call. + /// + /// + /// The interface is designed to be as minimal as possible, allow for quick peeking of the event type (id) + /// and the cancellation status and provides a delegate for retrieving the event details themselves. + /// + public interface IEventListener + { + Task Signal(string id, CancellationToken token, GetEventData createMessage); + CancellationToken Token { get; } + System.Action Cancel { get; } + } + + internal static partial class Extensions + { + public static Task Signal(this IEventListener instance, string id, CancellationToken token, Func createMessage) => instance.Signal(id, token, createMessage); + public static Task Signal(this IEventListener instance, string id, CancellationToken token) => instance.Signal(id, token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, EventData message) => instance.Signal(id, token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, Func createMessage) => instance.Signal(id, instance.Token, createMessage); + public static Task Signal(this IEventListener instance, string id) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, EventData message) => instance.Signal(id, instance.Token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, System.Uri uri) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = uri.ToString(), Cancel = instance.Cancel }); + + public static async Task AssertNotNull(this IEventListener instance, string parameterName, object value) + { + if (value == null) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' should not be null", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMinimumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length < length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is less than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMaximumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length > length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is greater than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + + public static async Task AssertRegEx(this IEventListener instance, string parameterName, string value, string regularExpression) + { + if (value != null && !System.Text.RegularExpressions.Regex.Match(value, regularExpression).Success) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' does not validate against pattern /{regularExpression}/", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertEnum(this IEventListener instance, string parameterName, string value, params string[] values) + { + if (!values.Any(each => each.Equals(value))) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' is not one of ({values.Aggregate((c, e) => $"'{e}',{c}")}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertObjectIsValid(this IEventListener instance, string parameterName, object inst) + { + await (inst as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IValidates)?.Validate(instance); + } + + public static async Task AssertIsLessThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) >= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) <= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsLessThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) > 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) < 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, Int64? value, Int64 multiple) + { + if (null != value && value % multiple != 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, double? value, double multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, decimal? value, decimal multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + } + + /// + /// An Implementation of the IEventListener that supports subscribing to events and dispatching them + /// (used for manually using the lowlevel interface) + /// + public class EventListener : CancellationTokenSource, IEnumerable>, IEventListener + { + private Dictionary calls = new Dictionary(); + public IEnumerator> GetEnumerator() => calls.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => calls.GetEnumerator(); + public EventListener() + { + } + + public new Action Cancel => base.Cancel; + private Event tracer; + + public EventListener(params (string name, Event callback)[] initializer) + { + foreach (var each in initializer) + { + Add(each.name, each.callback); + } + } + + public void Add(string name, SynchEvent callback) + { + Add(name, (message) => { callback(message); return Task.CompletedTask; }); + } + + public void Add(string name, Event callback) + { + if (callback != null) + { + if (string.IsNullOrEmpty(name)) + { + if (calls.ContainsKey(name)) + { + tracer += callback; + } + else + { + tracer = callback; + } + } + else + { + if (calls.ContainsKey(name)) + { + calls[name ?? System.String.Empty] += callback; + } + else + { + calls[name ?? System.String.Empty] = callback; + } + } + } + } + + + public async Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + using (NoSynchronizationContext) + { + if (!string.IsNullOrEmpty(id) && (calls.TryGetValue(id, out Event listener) || tracer != null)) + { + var message = createMessage(); + message.Id = id; + + await listener?.Invoke(message); + await tracer?.Invoke(message); + + if (token.IsCancellationRequested) + { + throw new OperationCanceledException($"Canceled by event {id} ", this.Token); + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Events.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Events.cs new file mode 100644 index 000000000000..88bbe4e10f4a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Events.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + public static partial class Events + { + public const string Log = nameof(Log); + public const string Validation = nameof(Validation); + public const string ValidationWarning = nameof(ValidationWarning); + public const string AfterValidation = nameof(AfterValidation); + public const string RequestCreated = nameof(RequestCreated); + public const string ResponseCreated = nameof(ResponseCreated); + public const string URLCreated = nameof(URLCreated); + public const string Finally = nameof(Finally); + public const string HeaderParametersAdded = nameof(HeaderParametersAdded); + public const string BodyContentSet = nameof(BodyContentSet); + public const string BeforeCall = nameof(BeforeCall); + public const string BeforeResponseDispatch = nameof(BeforeResponseDispatch); + public const string FollowingNextLink = nameof(FollowingNextLink); + public const string DelayBeforePolling = nameof(DelayBeforePolling); + public const string Polling = nameof(Polling); + + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Extensions.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Extensions.cs new file mode 100644 index 000000000000..c2f5c5f6f7ab --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Extensions.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + using System.Linq; + using System; + + internal static partial class Extensions + { + public static T[] SubArray(this T[] array, int offset, int length) + { + return new ArraySegment(array, offset, length) + .ToArray(); + } + + public static T ReadHeaders(this T instance, global::System.Net.Http.Headers.HttpResponseHeaders headers) where T : class + { + (instance as IHeaderSerializable)?.ReadHeaders(headers); + return instance; + } + + internal static bool If(T input, out T output) + { + if (null == input) + { + output = default(T); + return false; + } + output = input; + return true; + } + + internal static void AddIf(T value, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(value); + } + } + + internal static void AddIf(T value, string serializedName, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(serializedName, value); + } + } + + /// + /// Returns the first header value as a string from an HttpReponseMessage. + /// + /// the HttpResponseMessage to fetch a header from + /// the header name + /// the first header value as a string from an HttpReponseMessage. string.empty if there is no header value matching + internal static string GetFirstHeader(this System.Net.Http.HttpResponseMessage response, string headerName) => response.Headers.FirstOrDefault(each => string.Equals(headerName, each.Key, System.StringComparison.OrdinalIgnoreCase)).Value?.FirstOrDefault() ?? string.Empty; + + /// + /// Sets the Synchronization Context to null, and returns an IDisposable that when disposed, + /// will restore the synchonization context to the original value. + /// + /// This is used a less-invasive means to ensure that code in the library that doesn't + /// need to be continued in the original context doesn't have to have ConfigureAwait(false) + /// on every single await + /// + /// If the SynchronizationContext is null when this is used, the resulting IDisposable + /// will not do anything (this prevents excessive re-setting of the SynchronizationContext) + /// + /// Usage: + /// + /// using(NoSynchronizationContext) { + /// await SomeAsyncOperation(); + /// await SomeOtherOperation(); + /// } + /// + /// + /// + /// An IDisposable that will return the SynchronizationContext to original state + internal static System.IDisposable NoSynchronizationContext => System.Threading.SynchronizationContext.Current == null ? Dummy : new NoSyncContext(); + + /// + /// An instance of the Dummy IDispoable. + /// + /// + internal static System.IDisposable Dummy = new DummyDisposable(); + + /// + /// An IDisposable that does absolutely nothing. + /// + internal class DummyDisposable : System.IDisposable + { + public void Dispose() + { + } + } + /// + /// An IDisposable that saves the SynchronizationContext,sets it to null and + /// restores it to the original upon Dispose(). + /// + /// NOTE: This is designed to be less invasive than using .ConfigureAwait(false) + /// on every single await in library code (ie, places where we know we don't need + /// to continue in the same context as we went async) + /// + internal class NoSyncContext : System.IDisposable + { + private System.Threading.SynchronizationContext original = System.Threading.SynchronizationContext.Current; + internal NoSyncContext() + { + System.Threading.SynchronizationContext.SetSynchronizationContext(null); + } + public void Dispose() => System.Threading.SynchronizationContext.SetSynchronizationContext(original); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs new file mode 100644 index 000000000000..36985016a162 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal static class StringBuilderExtensions + { + /// + /// Extracts the buffered value and resets the buffer + /// + internal static string Extract(this StringBuilder builder) + { + var text = builder.ToString(); + + builder.Clear(); + + return text; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/Extensions/TypeExtensions.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/Extensions/TypeExtensions.cs new file mode 100644 index 000000000000..c68d79f90c16 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/Extensions/TypeExtensions.cs @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal static class TypeExtensions + { + internal static bool IsNullable(this Type type) => + type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable<>)); + + internal static Type GetOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition() == openGenericInterfaceType) + { + return candidateType; + } + + // Check if it references it's own converter.... + + foreach (Type interfaceType in candidateType.GetInterfaces()) + { + if (interfaceType.IsGenericType + && interfaceType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return interfaceType; + } + } + + return null; + } + + // Author: Sebastian Good + // http://stackoverflow.com/questions/503263/how-to-determine-if-a-type-implements-a-specific-generic-interface-type + internal static bool ImplementsOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + if (candidateType.Equals(openGenericInterfaceType)) + { + return true; + } + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return true; + } + + foreach (Type i in candidateType.GetInterfaces()) + { + if (i.IsGenericType && i.ImplementsOpenGenericInterface(openGenericInterfaceType)) + { + return true; + } + } + + return false; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/Seperator.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/Seperator.cs new file mode 100644 index 000000000000..feefa7e7dc1e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/Seperator.cs @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal static class Seperator + { + internal static readonly char[] Dash = { '-' }; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/TypeDetails.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/TypeDetails.cs new file mode 100644 index 000000000000..72f80462b988 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/TypeDetails.cs @@ -0,0 +1,116 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + + + + internal class TypeDetails + { + private readonly Type info; + + internal TypeDetails(Type info) + { + this.info = info ?? throw new ArgumentNullException(nameof(info)); + } + + internal Type NonNullType { get; set; } + + internal object DefaultValue { get; set; } + + internal bool IsNullable { get; set; } + + internal bool IsList { get; set; } + + internal bool IsStringLike { get; set; } + + internal bool IsEnum => info.IsEnum; + + internal bool IsArray => info.IsArray; + + internal bool IsValueType => info.IsValueType; + + internal Type ElementType { get; set; } + + internal IJsonConverter JsonConverter { get; set; } + + #region Creation + + private static readonly ConcurrentDictionary cache = new ConcurrentDictionary(); + + internal static TypeDetails Get() => Get(typeof(T)); + + internal static TypeDetails Get(Type type) => cache.GetOrAdd(type, Create); + + private static TypeDetails Create(Type type) + { + var isGenericList = !type.IsPrimitive && type.ImplementsOpenGenericInterface(typeof(IList<>)); + var isList = !type.IsPrimitive && (isGenericList || typeof(IList).IsAssignableFrom(type)); + + var isNullable = type.IsNullable(); + + Type elementType; + + if (type.IsArray) + { + elementType = type.GetElementType(); + } + else if (isGenericList) + { + var iList = type.GetOpenGenericInterface(typeof(IList<>)); + + elementType = iList.GetGenericArguments()[0]; + } + else + { + elementType = null; + } + + var nonNullType = isNullable ? type.GetGenericArguments()[0] : type; + + var isStringLike = false; + + IJsonConverter converter; + + var jsonConverterAttribute = type.GetCustomAttribute(); + + if (jsonConverterAttribute != null) + { + converter = jsonConverterAttribute.Converter; + } + else if (nonNullType.IsEnum) + { + converter = new EnumConverter(nonNullType); + } + else if (JsonConverterFactory.Instances.TryGetValue(nonNullType, out converter)) + { + } + else if (StringLikeHelper.IsStringLike(nonNullType)) + { + isStringLike = true; + + converter = new StringLikeConverter(nonNullType); + } + + return new TypeDetails(nonNullType) { + NonNullType = nonNullType, + DefaultValue = type.IsValueType ? Activator.CreateInstance(type) : null, + IsNullable = isNullable, + IsList = isList, + IsStringLike = isStringLike, + ElementType = elementType, + JsonConverter = converter + }; + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/XHelper.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/XHelper.cs new file mode 100644 index 000000000000..bb274146f707 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Helpers/XHelper.cs @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal static class XHelper + { + internal static JsonNode Create(JsonType type, TypeCode code, object value) + { + switch (type) + { + case JsonType.Binary : return new XBinary((byte[])value); + case JsonType.Boolean : return new JsonBoolean((bool)value); + case JsonType.Number : return new JsonNumber(value.ToString()); + case JsonType.String : return new JsonString((string)value); + } + + throw new Exception($"JsonType '{type}' does not have a fast conversion"); + } + + internal static bool TryGetElementType(TypeCode code, out JsonType type) + { + switch (code) + { + case TypeCode.Boolean : type = JsonType.Boolean; return true; + case TypeCode.Byte : type = JsonType.Number; return true; + case TypeCode.DateTime : type = JsonType.Date; return true; + case TypeCode.Decimal : type = JsonType.Number; return true; + case TypeCode.Double : type = JsonType.Number; return true; + case TypeCode.Empty : type = JsonType.Null; return true; + case TypeCode.Int16 : type = JsonType.Number; return true; + case TypeCode.Int32 : type = JsonType.Number; return true; + case TypeCode.Int64 : type = JsonType.Number; return true; + case TypeCode.SByte : type = JsonType.Number; return true; + case TypeCode.Single : type = JsonType.Number; return true; + case TypeCode.String : type = JsonType.String; return true; + case TypeCode.UInt16 : type = JsonType.Number; return true; + case TypeCode.UInt32 : type = JsonType.Number; return true; + case TypeCode.UInt64 : type = JsonType.Number; return true; + } + + type = default; + + return false; + } + + internal static JsonType GetElementType(TypeCode code) + { + switch (code) + { + case TypeCode.Boolean : return JsonType.Boolean; + case TypeCode.Byte : return JsonType.Number; + case TypeCode.DateTime : return JsonType.Date; + case TypeCode.Decimal : return JsonType.Number; + case TypeCode.Double : return JsonType.Number; + case TypeCode.Empty : return JsonType.Null; + case TypeCode.Int16 : return JsonType.Number; + case TypeCode.Int32 : return JsonType.Number; + case TypeCode.Int64 : return JsonType.Number; + case TypeCode.SByte : return JsonType.Number; + case TypeCode.Single : return JsonType.Number; + case TypeCode.String : return JsonType.String; + case TypeCode.UInt16 : return JsonType.Number; + case TypeCode.UInt32 : return JsonType.Number; + case TypeCode.UInt64 : return JsonType.Number; + default : return JsonType.Object; + } + + throw new Exception($"TypeCode '{code}' does not have a fast converter"); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/IAssociativeArray.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/IAssociativeArray.cs new file mode 100644 index 000000000000..f3c81da7eae5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/IAssociativeArray.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +#define DICT_PROPERTIES +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + /// A subset of IDictionary that doesn't implement IEnumerable or IDictionary to work around PowerShell's aggressive formatter + public interface IAssociativeArray + { +#if DICT_PROPERTIES + System.Collections.Generic.IEnumerable Keys { get; } + System.Collections.Generic.IEnumerable Values { get; } + int Count { get; } +#endif + System.Collections.Generic.IDictionary AdditionalProperties { get; } + T this[string index] { get; set; } + void Add(string key, T value); + bool ContainsKey(string key); + bool Remove(string key); + bool TryGetValue(string key, out T value); + void Clear(); + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/IHeaderSerializable.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/IHeaderSerializable.cs new file mode 100644 index 000000000000..9cb1162500b5 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/IHeaderSerializable.cs @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + public interface IHeaderSerializable + { + void ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers); + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/ISendAsync.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/ISendAsync.cs new file mode 100644 index 000000000000..926f91c23e05 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/ISendAsync.cs @@ -0,0 +1,300 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + + /// + /// The interface for sending an HTTP request across the wire. + /// + public interface ISendAsync + { + Task SendAsync(HttpRequestMessage request, IEventListener callback); + } + + public class SendAsyncTerminalFactory : ISendAsyncTerminalFactory, ISendAsync + { + SendAsync implementation; + + public SendAsyncTerminalFactory(SendAsync implementation) => this.implementation = implementation; + public SendAsyncTerminalFactory(ISendAsync implementation) => this.implementation = implementation.SendAsync; + public ISendAsync Create() => this; + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback); + } + + public partial class SendAsyncFactory : ISendAsyncFactory + { + public class Sender : ISendAsync + { + internal ISendAsync next; + internal SendAsyncStep implementation; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback, next); + } + SendAsyncStep implementation; + + public SendAsyncFactory(SendAsyncStep implementation) => this.implementation = implementation; + public ISendAsync Create(ISendAsync next) => new Sender { next = next, implementation = implementation }; + + } + + public class HttpClientFactory : ISendAsyncTerminalFactory, ISendAsync + { + HttpClient client; + public HttpClientFactory() : this(new HttpClient()) + { + } + public HttpClientFactory(HttpClient client) => this.client = client; + public ISendAsync Create() => this; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, callback.Token); + } + + public interface ISendAsyncFactory + { + ISendAsync Create(ISendAsync next); + } + + public interface ISendAsyncTerminalFactory + { + ISendAsync Create(); + } + + public partial class HttpPipeline : ISendAsync + { + private ISendAsync pipeline; + private ISendAsyncTerminalFactory terminal; + private List steps = new List(); + + public HttpPipeline() : this(new HttpClientFactory()) + { + } + + public HttpPipeline(ISendAsyncTerminalFactory terminalStep) + { + if (terminalStep == null) + { + throw new System.ArgumentNullException(nameof(terminalStep), "Terminal Step Factory in HttpPipeline may not be null"); + } + TerminalFactory = terminalStep; + } + + /// + /// Returns an HttpPipeline with the current state of this pipeline. + /// + public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + + public ISendAsyncTerminalFactory TerminalFactory + { + get => terminal; + set + { + if (value == null) + { + throw new System.ArgumentNullException("TerminalFactory in HttpPipeline may not be null"); + } + terminal = value; + } + } + + public ISendAsync Pipeline + { + get + { + // if the pipeline has been created and not invalidated, return it. + if (this.pipeline != null) + { + return this.pipeline; + } + + // create the pipeline from scratch. + var next = terminal.Create(); + foreach (var factory in steps) + { + // skip factories that return null. + next = factory.Create(next) ?? next; + } + return this.pipeline = next; + } + } + + public int Count => steps.Count; + + public HttpPipeline Prepend(ISendAsyncFactory item) + { + if (item != null) + { + steps.Add(item); + pipeline = null; + } + return this; + } + + public HttpPipeline Append(SendAsyncStep item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStep item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Append(ISendAsyncFactory item) + { + if (item != null) + { + steps.Insert(0, item); + pipeline = null; + } + return this; + } + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(item); + } + } + return this; + } + + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(item); + } + } + return this; + } + + // you can use this as the ISendAsync Implementation + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => Pipeline.SendAsync(request, callback); + } + + internal static partial class Extensions + { + internal static HttpRequestMessage CloneAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.Clone(requestUri, method); + } + } + + internal static Task CloneWithContentAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.CloneWithContent(requestUri, method); + } + } + + /// + /// Clones an HttpRequestMessage (without the content) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = new HttpRequestMessage + { + Method = method ?? original.Method, + RequestUri = requestUri ?? original.RequestUri, + Version = original.Version, + }; + + foreach (KeyValuePair prop in original.Properties) + { + clone.Properties.Add(prop); + } + + foreach (KeyValuePair> header in original.Headers) + { + /* + **temporarily skip cloning telemetry related headers** + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + */ + if (!"x-ms-unique-id".Equals(header.Key) && !"x-ms-client-request-id".Equals(header.Key) && !"CommandName".Equals(header.Key) && !"FullCommandName".Equals(header.Key) && !"ParameterSetName".Equals(header.Key) && !"User-Agent".Equals(header.Key)) + { + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + } + + return clone; + } + + /// + /// Clones an HttpRequestMessage (including the content stream and content headers) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = original.Clone(requestUri, method); + var stream = new System.IO.MemoryStream(); + if (original.Content != null) + { + await original.Content.CopyToAsync(stream).ConfigureAwait(false); + stream.Position = 0; + clone.Content = new StreamContent(stream); + if (original.Content.Headers != null) + { + foreach (var h in original.Content.Headers) + { + clone.Content.Headers.Add(h.Key, h.Value); + } + } + } + return clone; + } + } +} diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/InfoAttribute.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/InfoAttribute.cs new file mode 100644 index 000000000000..ba76050cd5af --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/InfoAttribute.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + using System; + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Class)] + public class InfoAttribute : Attribute + { + public bool Required { get; set; } = false; + public bool ReadOnly { get; set; } = false; + public Type[] PossibleTypes { get; set; } = new Type[0]; + public string Description { get; set; } = ""; + public string SerializedName { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class CompleterInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class DefaultInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Iso/IsoDate.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Iso/IsoDate.cs new file mode 100644 index 000000000000..db644708016b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Iso/IsoDate.cs @@ -0,0 +1,214 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal struct IsoDate + { + internal int Year { get; set; } // 0-3000 + + internal int Month { get; set; } // 1-12 + + internal int Day { get; set; } // 1-31 + + internal int Hour { get; set; } // 0-24 + + internal int Minute { get; set; } // 0-60 (60 is a special case) + + internal int Second { get; set; } // 0-60 (60 is used for leap seconds) + + internal double Millisecond { get; set; } // 0-999.9... + + internal TimeSpan Offset { get; set; } + + internal DateTimeKind Kind { get; set; } + + internal TimeSpan TimeOfDay => new TimeSpan(Hour, Minute, Second); + + internal DateTime ToDateTime() + { + if (Kind == DateTimeKind.Utc || Offset == TimeSpan.Zero) + { + return new DateTime(Year, Month, Day, Hour, Minute, Second, (int)Millisecond, DateTimeKind.Utc); + } + + return ToDateTimeOffset().DateTime; + } + + internal DateTimeOffset ToDateTimeOffset() + { + return new DateTimeOffset( + Year, + Month, + Day, + Hour, + Minute, + Second, + (int)Millisecond, + Offset + ); + } + + internal DateTime ToUtcDateTime() + { + return ToDateTimeOffset().UtcDateTime; + } + + public override string ToString() + { + var sb = new StringBuilder(); + + // yyyy-MM-dd + sb.Append($"{Year}-{Month:00}-{Day:00}"); + + if (TimeOfDay > new TimeSpan(0)) + { + sb.Append($"T{Hour:00}:{Minute:00}"); + + if (TimeOfDay.Seconds > 0) + { + sb.Append($":{Second:00}"); + } + } + + if (Offset.Ticks == 0) + { + sb.Append('Z'); // UTC + } + else + { + if (Offset.Ticks >= 0) + { + sb.Append('+'); + } + + sb.Append($"{Offset.Hours:00}:{Offset.Minutes:00}"); + } + + return sb.ToString(); + } + + internal static IsoDate FromDateTimeOffset(DateTimeOffset date) + { + return new IsoDate { + Year = date.Year, + Month = date.Month, + Day = date.Day, + Hour = date.Hour, + Minute = date.Minute, + Second = date.Second, + Offset = date.Offset, + Kind = date.Offset == TimeSpan.Zero ? DateTimeKind.Utc : DateTimeKind.Unspecified + }; + } + + private static readonly char[] timeSeperators = { ':', '.' }; + + internal static IsoDate Parse(string text) + { + var tzIndex = -1; + var timeIndex = text.IndexOf('T'); + + var builder = new IsoDate { Day = 1, Month = 1 }; + + // TODO: strip the time zone offset off the end + string dateTime = text; + string timeZone = null; + + if (dateTime.IndexOf('Z') > -1) + { + tzIndex = dateTime.LastIndexOf('Z'); + + builder.Kind = DateTimeKind.Utc; + } + else if (dateTime.LastIndexOf('+') > 10) + { + tzIndex = dateTime.LastIndexOf('+'); + } + else if (dateTime.LastIndexOf('-') > 10) + { + tzIndex = dateTime.LastIndexOf('-'); + } + + if (tzIndex > -1) + { + timeZone = dateTime.Substring(tzIndex); + dateTime = dateTime.Substring(0, tzIndex); + } + + string date = (timeIndex == -1) ? dateTime : dateTime.Substring(0, timeIndex); + + var dateParts = date.Split(Seperator.Dash); // '-' + + for (int i = 0; i < dateParts.Length; i++) + { + var part = dateParts[i]; + + switch (i) + { + case 0: builder.Year = int.Parse(part); break; + case 1: builder.Month = int.Parse(part); break; + case 2: builder.Day = int.Parse(part); break; + } + } + + if (timeIndex > -1) + { + string[] timeParts = dateTime.Substring(timeIndex + 1).Split(timeSeperators); + + for (int i = 0; i < timeParts.Length; i++) + { + var part = timeParts[i]; + + switch (i) + { + case 0: builder.Hour = int.Parse(part); break; + case 1: builder.Minute = int.Parse(part); break; + case 2: builder.Second = int.Parse(part); break; + case 3: builder.Millisecond = double.Parse("0." + part) * 1000; break; + } + } + } + + if (timeZone != null && timeZone != "Z") + { + var hours = int.Parse(timeZone.Substring(1, 2)); + var minutes = int.Parse(timeZone.Substring(4, 2)); + + if (timeZone[0] == '-') + { + hours = -hours; + minutes = -minutes; + } + + builder.Offset = new TimeSpan(hours, minutes, 0); + } + + return builder; + } + } + + /* + YYYY # eg 1997 + YYYY-MM # eg 1997-07 + YYYY-MM-DD # eg 1997-07-16 + YYYY-MM-DDThh:mmTZD # eg 1997-07-16T19:20+01:00 + YYYY-MM-DDThh:mm:ssTZD # eg 1997-07-16T19:20:30+01:00 + YYYY-MM-DDThh:mm:ss.sTZD # eg 1997-07-16T19:20:30.45+01:00 + + where: + + YYYY = four-digit year + MM = two-digit month (01=January, etc.) + DD = two-digit day of month (01 through 31) + hh = two digits of hour (00 through 23) (am/pm NOT allowed) + mm = two digits of minute (00 through 59) + ss = two digits of second (00 through 59) + s = one or more digits representing a decimal fraction of a second + TZD = time zone designator (Z or +hh:mm or -hh:mm) + */ +} diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/JsonType.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/JsonType.cs new file mode 100644 index 000000000000..b0bfde2b2e61 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/JsonType.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal enum JsonType + { + Null = 0, + Object = 1, + Array = 2, + Binary = 3, + Boolean = 4, + Date = 5, + Number = 6, + String = 7 + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Method.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Method.cs new file mode 100644 index 000000000000..ee2f19ec1075 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Method.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + internal static class Method + { + internal static System.Net.Http.HttpMethod Get = System.Net.Http.HttpMethod.Get; + internal static System.Net.Http.HttpMethod Put = System.Net.Http.HttpMethod.Put; + internal static System.Net.Http.HttpMethod Head = System.Net.Http.HttpMethod.Head; + internal static System.Net.Http.HttpMethod Post = System.Net.Http.HttpMethod.Post; + internal static System.Net.Http.HttpMethod Delete = System.Net.Http.HttpMethod.Delete; + internal static System.Net.Http.HttpMethod Options = System.Net.Http.HttpMethod.Options; + internal static System.Net.Http.HttpMethod Trace = System.Net.Http.HttpMethod.Trace; + internal static System.Net.Http.HttpMethod Patch = new System.Net.Http.HttpMethod("PATCH"); + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Models/JsonMember.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Models/JsonMember.cs new file mode 100644 index 000000000000..d0c0faecd5c4 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Models/JsonMember.cs @@ -0,0 +1,83 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + + + internal sealed class JsonMember + { + private readonly TypeDetails type; + + private readonly Func getter; + private readonly Action setter; + + internal JsonMember(PropertyInfo property, int defaultOrder) + { + getter = property.GetValue; + setter = property.SetValue; + + var dataMember = property.GetCustomAttribute(); + + Name = dataMember?.Name ?? property.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(property.PropertyType); + + CanRead = property.CanRead; + } + + internal JsonMember(FieldInfo field, int defaultOrder) + { + getter = field.GetValue; + setter = field.SetValue; + + var dataMember = field.GetCustomAttribute(); + + Name = dataMember?.Name ?? field.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(field.FieldType); + + CanRead = true; + } + + internal string Name { get; } + + internal int Order { get; } + + internal TypeDetails TypeDetails => type; + + internal Type Type => type.NonNullType; + + internal bool IsList => type.IsList; + + // Arrays, Sets, ... + internal Type ElementType => type.ElementType; + + internal IJsonConverter Converter => type.JsonConverter; + + internal bool EmitDefaultValue { get; } + + internal bool IsStringLike => type.IsStringLike; + + internal object DefaultValue => type.DefaultValue; + + internal bool CanRead { get; } + + #region Helpers + + internal object GetValue(object instance) => getter(instance); + + internal void SetValue(object instance, object value) => setter(instance, value); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Models/JsonModel.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Models/JsonModel.cs new file mode 100644 index 000000000000..cd34e7d51318 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Models/JsonModel.cs @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal class JsonModel + { + private Dictionary map; + private readonly object _sync = new object(); + + private JsonModel(Type type, List members) + { + Type = type ?? throw new ArgumentNullException(nameof(type)); + Members = members ?? throw new ArgumentNullException(nameof(members)); + } + + internal string Name => Type.Name; + + internal Type Type { get; } + + internal List Members { get; } + + internal JsonMember this[string name] + { + get + { + if (map == null) + { + lock (_sync) + { + if (map == null) + { + map = new Dictionary(); + + foreach (JsonMember m in Members) + { + map[m.Name.ToLower()] = m; + } + } + } + } + + + map.TryGetValue(name.ToLower(), out JsonMember member); + + return member; + } + } + + internal static JsonModel FromType(Type type) + { + var members = new List(); + + int i = 0; + + // BindingFlags.Instance | BindingFlags.Public + + foreach (var member in type.GetFields()) + { + if (member.IsStatic) continue; + + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + foreach (var member in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + members.Sort((a, b) => a.Order.CompareTo(b.Order)); // inline sort + + return new JsonModel(type, members); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Models/JsonModelCache.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Models/JsonModelCache.cs new file mode 100644 index 000000000000..f6f379219e9d --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Models/JsonModelCache.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal static class JsonModelCache + { + private static readonly ConditionalWeakTable cache + = new ConditionalWeakTable(); + + internal static JsonModel Get(Type type) => cache.GetValue(type, Create); + + private static JsonModel Create(Type type) => JsonModel.FromType(type); + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/JsonArray.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/JsonArray.cs new file mode 100644 index 000000000000..65fcf055ef0e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/JsonArray.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public abstract partial class JsonArray : JsonNode, IEnumerable + { + internal override JsonType Type => JsonType.Array; + + internal abstract JsonType? ElementType { get; } + + public abstract int Count { get; } + + internal virtual bool IsSet => false; + + internal bool IsEmpty => Count == 0; + + #region IEnumerable + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + #endregion + + #region Static Helpers + + internal static JsonArray Create(short[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(int[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(long[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(decimal[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(float[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(string[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(XBinary[] values) + => new XImmutableArray(values); + + #endregion + + internal static new JsonArray Parse(string text) + => (JsonArray)JsonNode.Parse(text); + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XImmutableArray.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XImmutableArray.cs new file mode 100644 index 000000000000..222eb104e7a0 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XImmutableArray.cs @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal sealed class XImmutableArray : JsonArray, IEnumerable + { + private readonly T[] values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XImmutableArray(T[] values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Length; + + public bool IsReadOnly => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + #region Static Constructor + + internal XImmutableArray Create(T[] items) + { + return new XImmutableArray(items); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XList.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XList.cs new file mode 100644 index 000000000000..8016079b1e45 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XList.cs @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal sealed class XList : JsonArray, IEnumerable + { + private readonly IList values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XList(IList values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Count; + + public bool IsReadOnly => values.IsReadOnly; + + #region IList + + public void Add(T value) + { + values.Add(value); + } + + public bool Contains(T value) => values.Contains(value); + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XNodeArray.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XNodeArray.cs new file mode 100644 index 000000000000..89ccec74562c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -0,0 +1,68 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed partial class XNodeArray : JsonArray, ICollection + { + private readonly List items; + + internal XNodeArray() + { + items = new List(); + } + + internal XNodeArray(params JsonNode[] values) + { + items = new List(values); + } + + public override JsonNode this[int index] => items[index]; + + internal override JsonType? ElementType => null; + + public bool IsReadOnly => false; + + public override int Count => items.Count; + + #region ICollection Members + + public void Add(JsonNode item) + { + items.Add(item); + } + + void ICollection.Clear() + { + items.Clear(); + } + + public bool Contains(JsonNode item) => items.Contains(item); + + void ICollection.CopyTo(JsonNode[] array, int arrayIndex) + { + items.CopyTo(array, arrayIndex); + } + + public bool Remove(JsonNode item) + { + return items.Remove(item); + } + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XSet.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XSet.cs new file mode 100644 index 000000000000..40026dad8bca --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/Collections/XSet.cs @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal sealed class XSet : JsonArray, IEnumerable + { + private readonly HashSet values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XSet(IEnumerable values) + : this(new HashSet(values)) + { } + + internal XSet(HashSet values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + internal override JsonType Type => JsonType.Array; + + internal override JsonType? ElementType => elementType; + + public bool IsReadOnly => true; + + public override int Count => values.Count; + + internal override bool IsSet => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + internal HashSet AsHashSet() => values; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonBoolean.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonBoolean.cs new file mode 100644 index 000000000000..ce3386cae623 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonBoolean.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal sealed partial class JsonBoolean : JsonNode + { + internal static readonly JsonBoolean True = new JsonBoolean(true); + internal static readonly JsonBoolean False = new JsonBoolean(false); + + internal JsonBoolean(bool value) + { + Value = value; + } + + internal bool Value { get; } + + internal override JsonType Type => JsonType.Boolean; + + internal static new JsonBoolean Parse(string text) + { + switch (text) + { + case "false": return False; + case "true": return True; + + default: throw new ArgumentException($"Expected true or false. Was {text}."); + } + } + + #region Implicit Casts + + public static implicit operator bool(JsonBoolean data) => data.Value; + + public static implicit operator JsonBoolean(bool data) => new JsonBoolean(data); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonDate.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonDate.cs new file mode 100644 index 000000000000..5c04b5f6208a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonDate.cs @@ -0,0 +1,173 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + + + internal sealed partial class JsonDate : JsonNode, IEquatable, IComparable + { + internal static bool AssumeUtcWhenKindIsUnspecified = true; + + private readonly DateTimeOffset value; + + internal JsonDate(DateTime value) + { + if (value.Kind == DateTimeKind.Unspecified && AssumeUtcWhenKindIsUnspecified) + { + value = DateTime.SpecifyKind(value, DateTimeKind.Utc); + } + + this.value = value; + } + + internal JsonDate(DateTimeOffset value) + { + this.value = value; + } + + internal override JsonType Type => JsonType.Date; + + #region Helpers + + internal DateTimeOffset ToDateTimeOffset() + { + return value; + } + + internal DateTime ToDateTime() + { + if (value.Offset == TimeSpan.Zero) + { + return value.UtcDateTime; + } + + return value.DateTime; + } + + internal DateTime ToUtcDateTime() => value.UtcDateTime; + + internal int ToUnixTimeSeconds() + { + return (int)value.ToUnixTimeSeconds(); + } + + internal long ToUnixTimeMilliseconds() + { + return (int)value.ToUnixTimeMilliseconds(); + } + + internal string ToIsoString() + { + return IsoDate.FromDateTimeOffset(value).ToString(); + } + + #endregion + + public override string ToString() + { + return ToIsoString(); + } + + internal static new JsonDate Parse(string text) + { + if (text == null) throw new ArgumentNullException(nameof(text)); + + // TODO support: unixtimeseconds.partialseconds + + if (text.Length > 4 && _IsNumber(text)) // UnixTime + { + var date = DateTimeOffset.FromUnixTimeSeconds(long.Parse(text)); + + return new JsonDate(date); + } + else if (text.Length <= 4 || text[4] == '-') // ISO: 2012- + { + return new JsonDate(IsoDate.Parse(text).ToDateTimeOffset()); + } + else + { + // NOT ISO ENCODED + // "Thu, 5 Apr 2012 16:59:01 +0200", + return new JsonDate(DateTimeOffset.Parse(text)); + } + } + + private static bool _IsNumber(string text) + { + foreach (var c in text) + { + if (!char.IsDigit(c)) return false; + } + + return true; + } + + internal static JsonDate FromUnixTime(int seconds) + { + return new JsonDate(DateTimeOffset.FromUnixTimeSeconds(seconds)); + } + + internal static JsonDate FromUnixTime(double seconds) + { + var milliseconds = (long)(seconds * 1000d); + + return new JsonDate(DateTimeOffset.FromUnixTimeMilliseconds(milliseconds)); + } + + #region Implicit Casts + + public static implicit operator DateTimeOffset(JsonDate value) + => value.ToDateTimeOffset(); + + public static implicit operator DateTime(JsonDate value) + => value.ToDateTime(); + + // From Date + public static implicit operator JsonDate(DateTimeOffset value) + { + return new JsonDate(value); + } + + public static implicit operator JsonDate(DateTime value) + { + return new JsonDate(value); + } + + // From String + public static implicit operator JsonDate(string value) + { + return Parse(value); + } + + #endregion + + #region Equality + + public override bool Equals(object obj) + { + return obj is JsonDate date && date.value == this.value; + } + + public bool Equals(JsonDate other) + { + return this.value == other.value; + } + + public override int GetHashCode() => value.GetHashCode(); + + #endregion + + #region IComparable Members + + int IComparable.CompareTo(JsonDate other) + { + return value.CompareTo(other.value); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonNode.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonNode.cs new file mode 100644 index 000000000000..e4c62f076728 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonNode.cs @@ -0,0 +1,250 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + + + public abstract partial class JsonNode + { + internal abstract JsonType Type { get; } + + public virtual JsonNode this[int index] => throw new NotImplementedException(); + + public virtual JsonNode this[string name] + { + get => throw new NotImplementedException(); + set => throw new NotImplementedException(); + } + + #region Type Helpers + + internal bool IsArray => Type == JsonType.Array; + + internal bool IsDate => Type == JsonType.Date; + + internal bool IsObject => Type == JsonType.Object; + + internal bool IsNumber => Type == JsonType.Number; + + internal bool IsNull => Type == JsonType.Null; + + #endregion + + internal void WriteTo(TextWriter textWriter, bool pretty = true) + { + var writer = new JsonWriter(textWriter, pretty); + + writer.WriteNode(this); + } + + internal T As() + where T : new() + => new JsonSerializer().Deseralize((JsonObject)this); + + internal T[] ToArrayOf() + { + return (T[])new JsonSerializer().DeserializeArray(typeof(T[]), (JsonArray)this); + } + + #region ToString Overrides + + public override string ToString() => ToString(pretty: true); + + internal string ToString(bool pretty) + { + var sb = new StringBuilder(); + + using (var writer = new StringWriter(sb)) + { + WriteTo(writer, pretty); + + return sb.ToString(); + } + } + + #endregion + + #region Static Constructors + + internal static JsonNode Parse(string text) + { + return Parse(new SourceReader(new StringReader(text))); + } + + internal static JsonNode Parse(TextReader textReader) + => Parse(new SourceReader(textReader)); + + private static JsonNode Parse(SourceReader sourceReader) + { + using (var parser = new JsonParser(sourceReader)) + { + return parser.ReadNode(); + } + } + + internal static JsonNode FromObject(object instance) + => new JsonSerializer().Serialize(instance); + + #endregion + + #region Implict Casts + + public static implicit operator string(JsonNode node) => node.ToString(); + + #endregion + + #region Explict Casts + + public static explicit operator DateTime(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date: + return ((JsonDate)node).ToDateTime(); + + case JsonType.String: + return JsonDate.Parse(node.ToString()).ToDateTime(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num).UtcDateTime; + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)).UtcDateTime; + } + } + + throw new ConversionException(node, typeof(DateTime)); + } + + public static explicit operator DateTimeOffset(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date : return ((JsonDate)node).ToDateTimeOffset(); + case JsonType.String : return JsonDate.Parse(node.ToString()).ToDateTimeOffset(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num); + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)); + } + + } + + throw new ConversionException(node, typeof(DateTimeOffset)); + } + + public static explicit operator float(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return float.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(float)); + } + + public static explicit operator double(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return double.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(double)); + } + + public static explicit operator decimal(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return decimal.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(decimal)); + } + + public static explicit operator Guid(JsonNode node) + => new Guid(node.ToString()); + + public static explicit operator short(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return short.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(short)); + } + + public static explicit operator int(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return int.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(int)); + } + + public static explicit operator long(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return long.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(long)); + } + + public static explicit operator bool(JsonNode node) + => ((JsonBoolean)node).Value; + + public static explicit operator ushort(JsonNode node) + => (JsonNumber)node; + + public static explicit operator uint(JsonNode node) + => (JsonNumber)node; + + public static explicit operator ulong(JsonNode node) + => (JsonNumber)node; + + public static explicit operator TimeSpan(JsonNode node) + => TimeSpan.Parse(node.ToString()); + + public static explicit operator Uri(JsonNode node) + { + if (node.Type == JsonType.String) + { + return new Uri(node.ToString()); + } + + throw new ConversionException(node, typeof(Uri)); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonNumber.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonNumber.cs new file mode 100644 index 000000000000..74497b1bb07e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonNumber.cs @@ -0,0 +1,109 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed partial class JsonNumber : JsonNode + { + private readonly string value; + private readonly bool overflows = false; + + internal JsonNumber(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal JsonNumber(int value) + { + this.value = value.ToString(); + } + + internal JsonNumber(long value) + { + this.value = value.ToString(); + + if (value > 9007199254740991) + { + overflows = true; + } + } + + internal JsonNumber(float value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal JsonNumber(double value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal override JsonType Type => JsonType.Number; + + internal string Value => value; + + #region Helpers + + internal bool Overflows => overflows; + + internal bool IsInteger => !value.Contains("."); + + internal bool IsFloat => value.Contains("."); + + #endregion + + #region Casting + + public static implicit operator byte(JsonNumber number) + => byte.Parse(number.Value); + + public static implicit operator short(JsonNumber number) + => short.Parse(number.Value); + + public static implicit operator int(JsonNumber number) + => int.Parse(number.Value); + + public static implicit operator long(JsonNumber number) + => long.Parse(number.value); + + public static implicit operator UInt16(JsonNumber number) + => ushort.Parse(number.Value); + + public static implicit operator UInt32(JsonNumber number) + => uint.Parse(number.Value); + + public static implicit operator UInt64(JsonNumber number) + => ulong.Parse(number.Value); + + public static implicit operator decimal(JsonNumber number) + => decimal.Parse(number.Value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator Double(JsonNumber number) + => double.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator float(JsonNumber number) + => float.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator JsonNumber(short data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(int data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(long data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(Single data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(double data) + => new JsonNumber(data.ToString()); + + #endregion + + public override string ToString() => value; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonObject.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonObject.cs new file mode 100644 index 000000000000..e106425dd549 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonObject.cs @@ -0,0 +1,172 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public partial class JsonObject : JsonNode, IDictionary + { + private readonly Dictionary items; + + internal JsonObject() + { + items = new Dictionary(); + } + + internal JsonObject(IEnumerable> properties) + { + if (properties == null) throw new ArgumentNullException(nameof(properties)); + + items = new Dictionary(); + + foreach (var field in properties) + { + items.Add(field.Key, field.Value); + } + } + + #region IDictionary Constructors + + internal JsonObject(IDictionary dic) + { + items = new Dictionary(dic.Count); + + foreach (var pair in dic) + { + Add(pair.Key, pair.Value); + } + } + + #endregion + + internal override JsonType Type => JsonType.Object; + + #region Add Overloads + + public void Add(string name, JsonNode value) => + items.Add(name, value); + + public void Add(string name, byte[] value) => + items.Add(name, new XBinary(value)); + + public void Add(string name, DateTime value) => + items.Add(name, new JsonDate(value)); + + public void Add(string name, int value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, long value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, float value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, double value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, string value) => + items.Add(name, new JsonString(value)); + + public void Add(string name, bool value) => + items.Add(name, new JsonBoolean(value)); + + public void Add(string name, Uri url) => + items.Add(name, new JsonString(url.AbsoluteUri)); + + public void Add(string name, string[] values) => + items.Add(name, new XImmutableArray(values)); + + public void Add(string name, int[] values) => + items.Add(name, new XImmutableArray(values)); + + #endregion + + #region ICollection> Members + + void ICollection>.Add(KeyValuePair item) + { + items.Add(item.Key, item.Value); + } + + void ICollection>.Clear() + { + items.Clear(); + } + + bool ICollection>.Contains(KeyValuePair item) => + throw new NotImplementedException(); + + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => + throw new NotImplementedException(); + + + int ICollection>.Count => items.Count; + + bool ICollection>.IsReadOnly => false; + + bool ICollection>.Remove(KeyValuePair item) => + throw new NotImplementedException(); + + #endregion + + #region IDictionary Members + + public bool ContainsKey(string key) => items.ContainsKey(key); + + public ICollection Keys => items.Keys; + + public bool Remove(string key) => items.Remove(key); + + public bool TryGetValue(string key, out JsonNode value) => + items.TryGetValue(key, out value); + + public ICollection Values => items.Values; + + public override JsonNode this[string key] + { + get => items[key]; + set => items[key] = value; + } + + #endregion + + #region IEnumerable + + IEnumerator> IEnumerable>.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + + #region Helpers + + internal static new JsonObject FromObject(object instance) => + (JsonObject)new JsonSerializer().Serialize(instance); + + #endregion + + #region Static Constructors + + internal static JsonObject FromStream(Stream stream) + { + using (var tr = new StreamReader(stream)) + { + return (JsonObject)Parse(tr); + } + } + + internal static new JsonObject Parse(string text) + { + return (JsonObject)JsonNode.Parse(text); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonString.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonString.cs new file mode 100644 index 000000000000..1de1f24d2e8a --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/JsonString.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed partial class JsonString : JsonNode, IEquatable + { + private readonly string value; + + internal JsonString(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal override JsonType Type => JsonType.String; + + internal string Value => value; + + internal int Length => value.Length; + + #region #region Implicit Casts + + public static implicit operator string(JsonString data) => data.Value; + + public static implicit operator JsonString(string value) => new JsonString(value); + + #endregion + + public override int GetHashCode() => value.GetHashCode(); + + public override string ToString() => value; + + #region IEquatable + + bool IEquatable.Equals(JsonString other) => this.Value == other.Value; + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/XBinary.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/XBinary.cs new file mode 100644 index 000000000000..b8a6b6d24f9b --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/XBinary.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal sealed class XBinary : JsonNode + { + private readonly byte[] _value; + private readonly string _base64; + + internal XBinary(byte[] value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal XBinary(string base64EncodedString) + { + _base64 = base64EncodedString ?? throw new ArgumentNullException(nameof(base64EncodedString)); + } + + internal override JsonType Type => JsonType.Binary; + + internal byte[] Value => _value ?? Convert.FromBase64String(_base64); + + #region #region Implicit Casts + + public static implicit operator byte[] (XBinary data) => data.Value; + + public static implicit operator XBinary(byte[] data) => new XBinary(data); + + #endregion + + public override int GetHashCode() => Value.GetHashCode(); + + public override string ToString() => _base64 ?? Convert.ToBase64String(_value); + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/XNull.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/XNull.cs new file mode 100644 index 000000000000..a507ac951117 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Nodes/XNull.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal sealed class XNull : JsonNode + { + internal static readonly XNull Instance = new XNull(); + + private XNull() { } + + internal override JsonType Type => JsonType.Null; + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/Exceptions/ParseException.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/Exceptions/ParseException.cs new file mode 100644 index 000000000000..5bc9c4b662db --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/Exceptions/ParseException.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal class ParserException : Exception + { + internal ParserException(string message) + : base(message) + { } + + internal ParserException(string message, SourceLocation location) + : base(message) + { + + Location = location; + } + + internal SourceLocation Location { get; } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/JsonParser.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/JsonParser.cs new file mode 100644 index 000000000000..4495d790d22c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/JsonParser.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public class JsonParser : IDisposable + { + private readonly TokenReader reader; + + internal JsonParser(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonParser(SourceReader sourceReader) + { + if (sourceReader == null) + throw new ArgumentNullException(nameof(sourceReader)); + + this.reader = new TokenReader(new JsonTokenizer(sourceReader)); + + this.reader.Next(); // Start with the first token + } + + internal IEnumerable ReadNodes() + { + JsonNode node; + + while ((node = ReadNode()) != null) yield return node; + } + + internal JsonNode ReadNode() + { + if (reader.Current.Kind == TokenKind.Eof || reader.Current.IsTerminator) + { + return null; + } + + switch (reader.Current.Kind) + { + case TokenKind.LeftBrace : return ReadObject(); // { + case TokenKind.LeftBracket : return ReadArray(); // [ + + default: throw new ParserException($"Expected '{{' or '['. Was {reader.Current}."); + } + } + + private JsonNode ReadFieldValue() + { + // Boolean, Date, Null, Number, String, Uri + if (reader.Current.IsLiteral) + { + return ReadLiteral(); + } + else + { + switch (reader.Current.Kind) + { + case TokenKind.LeftBracket: return ReadArray(); + case TokenKind.LeftBrace : return ReadObject(); + + default: throw new ParserException($"Unexpected token reading field value. Was {reader.Current}."); + } + } + } + + private JsonNode ReadLiteral() + { + var literal = reader.Current; + + reader.Next(); // Read the literal token + + switch (literal.Kind) + { + case TokenKind.Boolean : return JsonBoolean.Parse(literal.Value); + case TokenKind.Null : return XNull.Instance; + case TokenKind.Number : return new JsonNumber(literal.Value); + case TokenKind.String : return new JsonString(literal.Value); + + default: throw new ParserException($"Unexpected token reading literal. Was {literal}."); + } + } + + internal JsonObject ReadObject() + { + reader.Ensure(TokenKind.LeftBrace, "object"); + + reader.Next(); // Read '{' (Object start) + + var jsonObject = new JsonObject(); + + // Read the object's fields until we reach the end of the object ('}') + while (reader.Current.Kind != TokenKind.RightBrace) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read ',' (Seperator) + } + + // Ensure we have a field name + reader.Ensure(TokenKind.String, "Expected field name"); + + var field = ReadField(); + + jsonObject.Add(field.Key, field.Value); + } + + reader.Next(); // Read '}' (Object end) + + return jsonObject; + } + + + // TODO: Use ValueTuple in C#7 + private KeyValuePair ReadField() + { + var fieldName = reader.Current.Value; + + reader.Next(); // Read the field name + + reader.Ensure(TokenKind.Colon, "field"); + + reader.Next(); // Read ':' (Field value indicator) + + return new KeyValuePair(fieldName, ReadFieldValue()); + } + + + internal JsonArray ReadArray() + { + reader.Ensure(TokenKind.LeftBracket, "array"); + + var array = new XNodeArray(); + + reader.Next(); // Read the '[' (Array start) + + // Read the array's items + while (reader.Current.Kind != TokenKind.RightBracket) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read the ',' (Seperator) + } + + if (reader.Current.IsLiteral) + { + array.Add(ReadLiteral()); // Boolean, Date, Number, Null, String, Uri + } + else if (reader.Current.Kind == TokenKind.LeftBracket) + { + array.Add(ReadArray()); // Array + } + else if (reader.Current.Kind == TokenKind.LeftBrace) + { + array.Add(ReadObject()); // Object + } + else + { + throw new ParserException($"Expected comma, literal, or object. Was {reader.Current}."); + } + } + + reader.Next(); // Read the ']' (Array end) + + return array; + } + + #region IDisposable + + public void Dispose() + { + reader.Dispose(); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/JsonToken.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/JsonToken.cs new file mode 100644 index 000000000000..cf962a2c17c6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/JsonToken.cs @@ -0,0 +1,66 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal enum TokenKind + { + LeftBrace, // { Object start + RightBrace, // } Object end + + LeftBracket, // [ Array start + RightBracket, // ] Array end + + Comma, // , Comma + Colon, // : Value indicator + Dot, // . Access field indicator + Terminator, // \0 Stream terminator + + Boolean = 31, // true or false + Null = 33, // null + Number = 34, // i.e. -1.93, -1, 0, 1, 1.1 + String = 35, // i.e. "text" + + Eof = 50 + } + + internal /* readonly */ struct JsonToken + { + internal static readonly JsonToken BraceOpen = new JsonToken(TokenKind.LeftBrace, "{"); + internal static readonly JsonToken BraceClose = new JsonToken(TokenKind.RightBrace, "}"); + + internal static readonly JsonToken BracketOpen = new JsonToken(TokenKind.LeftBracket, "["); + internal static readonly JsonToken BracketClose = new JsonToken(TokenKind.RightBracket, "]"); + + internal static readonly JsonToken Colon = new JsonToken(TokenKind.Colon, ":"); + internal static readonly JsonToken Comma = new JsonToken(TokenKind.Comma, ","); + internal static readonly JsonToken Terminator = new JsonToken(TokenKind.Terminator, "\0"); + + internal static readonly JsonToken True = new JsonToken(TokenKind.Boolean, "true"); + internal static readonly JsonToken False = new JsonToken(TokenKind.Boolean, "false"); + internal static readonly JsonToken Null = new JsonToken(TokenKind.Null, "null"); + + internal static readonly JsonToken Eof = new JsonToken(TokenKind.Eof, null); + + internal JsonToken(TokenKind kind, string value) + { + Kind = kind; + Value = value; + } + + internal readonly TokenKind Kind; + + internal readonly string Value; + + public override string ToString() => Kind + ": " + Value; + + #region Helpers + + internal bool IsLiteral => (byte)Kind > 30 && (byte)Kind < 40; + + internal bool IsTerminator => Kind == TokenKind.Terminator; + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/JsonTokenizer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/JsonTokenizer.cs new file mode 100644 index 000000000000..bec239ef1856 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/JsonTokenizer.cs @@ -0,0 +1,177 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + using System.IO; + + + public class JsonTokenizer : IDisposable + { + private readonly StringBuilder sb = new StringBuilder(); + + private readonly SourceReader reader; + + internal JsonTokenizer(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonTokenizer(SourceReader reader) + { + this.reader = reader; + + reader.Next(); // Start with the first char + } + + internal JsonToken ReadNext() + { + reader.SkipWhitespace(); + + if (reader.IsEof) return JsonToken.Eof; + + switch (reader.Current) + { + case '"': return ReadQuotedString(); + + // Symbols + case '[' : reader.Next(); return JsonToken.BracketOpen; // Array start + case ']' : reader.Next(); return JsonToken.BracketClose; // Array end + case ',' : reader.Next(); return JsonToken.Comma; // Value seperator + case ':' : reader.Next(); return JsonToken.Colon; // Field value indicator + case '{' : reader.Next(); return JsonToken.BraceOpen; // Object start + case '}' : reader.Next(); return JsonToken.BraceClose; // Object end + case '\0' : reader.Next(); return JsonToken.Terminator; // Stream terminiator + + default: return ReadLiteral(); + } + } + + private JsonToken ReadQuotedString() + { + Expect('"', "quoted string indicator"); + + reader.Next(); // Read '"' (Starting quote) + + // Read until we reach an unescaped quote char + while (reader.Current != '"') + { + EnsureNotEof("quoted string"); + + if (reader.Current == '\\') + { + char escapedCharacter = reader.ReadEscapeCode(); + + sb.Append(escapedCharacter); + + continue; + } + + StoreCurrentCharacterAndReadNext(); + } + + reader.Next(); // Read '"' (Ending quote) + + return new JsonToken(TokenKind.String, value: sb.Extract()); + } + + private JsonToken ReadLiteral() + { + if (char.IsDigit(reader.Current) || + reader.Current == '-' || + reader.Current == '+') + { + return ReadNumber(); + } + + return ReadIdentifer(); + } + + private JsonToken ReadNumber() + { + // Read until we hit a non-numeric character + // -6.247737e-06 + // E + + while (char.IsDigit(reader.Current) + || reader.Current == '.' + || reader.Current == 'e' + || reader.Current == 'E' + || reader.Current == '-' + || reader.Current == '+') + { + StoreCurrentCharacterAndReadNext(); + } + + return new JsonToken(TokenKind.Number, value: sb.Extract()); + } + + int count = 0; + + private JsonToken ReadIdentifer() + { + count++; + + if (!char.IsLetter(reader.Current)) + { + throw new ParserException( + message : $"Expected literal (number, boolean, or null). Was '{reader.Current}'.", + location : reader.Location + ); + } + + // Read letters, numbers, and underscores '_' + while (char.IsLetterOrDigit(reader.Current) || reader.Current == '_') + { + StoreCurrentCharacterAndReadNext(); + } + + string text = sb.Extract(); + + switch (text) + { + case "true": return JsonToken.True; + case "false": return JsonToken.False; + case "null": return JsonToken.Null; + + default: return new JsonToken(TokenKind.String, text); + } + } + + private void Expect(char character, string description) + { + if (reader.Current != character) + { + throw new ParserException( + message: $"Expected {description} ('{character}'). Was '{reader.Current}'.", + location: reader.Location + ); + } + } + + private void EnsureNotEof(string tokenType) + { + if (reader.IsEof) + { + throw new ParserException( + message: $"Unexpected EOF while reading {tokenType}.", + location: reader.Location + ); + } + } + + private void StoreCurrentCharacterAndReadNext() + { + sb.Append(reader.Current); + + reader.Next(); + } + + public void Dispose() + { + reader.Dispose(); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/Location.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/Location.cs new file mode 100644 index 000000000000..0ef605d22fb3 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/Location.cs @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal struct SourceLocation + { + private int line; + private int column; + private int position; + + internal SourceLocation(int line = 0, int column = 0, int position = 0) + { + this.line = line; + this.column = column; + this.position = position; + } + + internal int Line => line; + + internal int Column => column; + + internal int Position => position; + + internal void Advance() + { + this.column++; + this.position++; + } + + internal void MarkNewLine() + { + this.line++; + this.column = 0; + } + + internal SourceLocation Clone() + { + return new SourceLocation(line, column, position); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/Readers/SourceReader.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/Readers/SourceReader.cs new file mode 100644 index 000000000000..8a06d50e9d0e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/Readers/SourceReader.cs @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Globalization; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public sealed class SourceReader : IDisposable + { + private readonly TextReader source; + + private char current; + + private readonly SourceLocation location = new SourceLocation(); + + private bool isEof = false; + + internal SourceReader(TextReader textReader) + { + this.source = textReader ?? throw new ArgumentNullException(nameof(textReader)); + } + + /// + /// Advances to the next character + /// + internal void Next() + { + // Advance to the new line when we see a new line '\n'. + // A new line may be prefixed by a carriage return '\r'. + + if (current == '\n') + { + location.MarkNewLine(); + } + + int charCode = source.Read(); // -1 for end + + if (charCode >= 0) + { + current = (char)charCode; + } + else + { + // If we've already marked this as the EOF, throw an exception + if (isEof) + { + throw new EndOfStreamException("Cannot advance past end of stream."); + } + + isEof = true; + + current = '\0'; + } + + location.Advance(); + } + + internal void SkipWhitespace() + { + while (char.IsWhiteSpace(current)) + { + Next(); + } + } + + internal char ReadEscapeCode() + { + Next(); + + char escapedChar = current; + + Next(); // Consume escaped character + + switch (escapedChar) + { + // Special escape codes + case '"': return '"'; // " (Quotation mark) U+0022 + case '/': return '/'; // / (Solidus) U+002F + case '\\': return '\\'; // \ (Reverse solidus) U+005C + + // Control Characters + case '0': return '\0'; // Nul (0) U+0000 + case 'a': return '\a'; // Alert (7) + case 'b': return '\b'; // Backspace (8) U+0008 + case 'f': return '\f'; // Form feed (12) U+000C + case 'n': return '\n'; // Line feed (10) U+000A + case 'r': return '\r'; // Carriage return (13) U+000D + case 't': return '\t'; // Horizontal tab (9) U+0009 + case 'v': return '\v'; // Vertical tab + + // Unicode escape sequence + case 'u': return ReadUnicodeEscapeSequence(); // U+XXXX + + default: throw new Exception($"Unrecognized escape sequence '\\{escapedChar}'"); + } + } + + private readonly char[] hexCode = new char[4]; + + private char ReadUnicodeEscapeSequence() + { + hexCode[0] = current; Next(); + hexCode[1] = current; Next(); + hexCode[2] = current; Next(); + hexCode[3] = current; Next(); + + return Convert.ToChar(int.Parse( + s : new string(hexCode), + style : NumberStyles.HexNumber, + provider: NumberFormatInfo.InvariantInfo + )); + } + + internal char Current => current; + + internal bool IsEof => isEof; + + internal char Peek() => (char)source.Peek(); + + internal SourceLocation Location => location; + + public void Dispose() + { + source.Dispose(); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/TokenReader.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/TokenReader.cs new file mode 100644 index 000000000000..675c919f720e --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Parser/TokenReader.cs @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + public class TokenReader : IDisposable + { + private readonly JsonTokenizer tokenizer; + private JsonToken current; + + internal TokenReader(JsonTokenizer tokenizer) + { + this.tokenizer = tokenizer ?? throw new ArgumentNullException(nameof(tokenizer)); + } + + internal void Next() + { + current = tokenizer.ReadNext(); + } + + internal JsonToken Current => current; + + internal void Ensure(TokenKind kind, string readerName) + { + if (current.Kind != kind) + { + throw new ParserException($"Expected {kind} while reading {readerName}). Was {current}."); + } + } + + public void Dispose() + { + tokenizer.Dispose(); + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/PipelineMocking.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/PipelineMocking.cs new file mode 100644 index 000000000000..bbf13afd6946 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/PipelineMocking.cs @@ -0,0 +1,262 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + using System.Threading.Tasks; + using System.Collections.Generic; + using System.Net.Http; + using System.Linq; + using System.Net; + using Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json; + + public enum MockMode + { + Live, + Record, + Playback, + + } + + public class PipelineMock + { + + private System.Collections.Generic.Stack scenario = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack context = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack description = new System.Collections.Generic.Stack(); + + private readonly string recordingPath; + private int counter = 0; + + public static implicit operator Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SendAsyncStep(PipelineMock instance) => instance.SendAsync; + + public MockMode Mode { get; set; } = MockMode.Live; + public PipelineMock(string recordingPath) + { + this.recordingPath = recordingPath; + } + + public void PushContext(string text) => context.Push(text); + + public void PushDescription(string text) => description.Push(text); + + + public void PushScenario(string it) + { + // reset counter too + counter = 0; + + scenario.Push(it); + } + + public void PopContext() => context.Pop(); + + public void PopDescription() => description.Pop(); + + public void PopScenario() => scenario.Pop(); + + public void SetRecord() => Mode = MockMode.Record; + + public void SetPlayback() => Mode = MockMode.Playback; + + public void SetLive() => Mode = MockMode.Live; + + public string Scenario => (scenario.Count > 0 ? scenario.Peek() : "[NoScenario]"); + public string Description => (description.Count > 0 ? description.Peek() : "[NoDescription]"); + public string Context => (context.Count > 0 ? context.Peek() : "[NoContext]"); + + /// + /// Headers that we substitute out blank values for in the recordings + /// Add additional headers as necessary + /// + public static HashSet Blacklist = new HashSet(System.StringComparer.CurrentCultureIgnoreCase) { + "Authorization", + }; + + public Dictionary ForceResponseHeaders = new Dictionary(); + + internal static XImmutableArray Removed = new XImmutableArray(new string[] { "[Filtered]" }); + + internal static IEnumerable> FilterHeaders(IEnumerable>> headers) => headers.Select(header => new KeyValuePair(header.Key, Blacklist.Contains(header.Key) ? Removed : new XImmutableArray(header.Value.ToArray()))); + + internal static JsonNode SerializeContent(HttpContent content, ref bool isBase64) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result, ref isBase64); + + internal static JsonNode SerializeContent(byte[] content, ref bool isBase64) + { + if (null == content || content.Length == 0) + { + return XNull.Instance; + } + var first = content[0]; + var last = content[content.Length - 1]; + + // plaintext for JSON/SGML/XML/HTML/STRINGS/ARRAYS + if ((first == '{' && last == '}') || (first == '<' && last == '>') || (first == '[' && last == ']') || (first == '"' && last == '"')) + { + return new JsonString(System.Text.Encoding.UTF8.GetString(content)); + } + + // base64 for everyone else + return new JsonString(System.Convert.ToBase64String(content)); + } + + internal static byte[] DeserializeContent(string content, bool isBase64) + { + if (string.IsNullOrWhiteSpace(content)) + { + return new byte[0]; + } + + if (isBase64) + { + try + { + return System.Convert.FromBase64String(content); + } + catch + { + // hmm. didn't work, return it as a string I guess. + } + } + return System.Text.Encoding.UTF8.GetBytes(content); + } + + public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMessage response) + { + var messages = System.IO.File.Exists(this.recordingPath) ? Load() : new JsonObject() ?? new JsonObject(); + bool isBase64Request = false; + bool isBase64Response = false; + messages[rqKey] = new JsonObject { + { "Request",new JsonObject { + { "Method", request.Method.Method }, + { "RequestUri", request.RequestUri }, + { "Content", SerializeContent( request.Content, ref isBase64Request) }, + { "isContentBase64", isBase64Request }, + { "Headers", new JsonObject(FilterHeaders(request.Headers)) }, + { "ContentHeaders", request.Content == null ? new JsonObject() : new JsonObject(FilterHeaders(request.Content.Headers))} + } }, + {"Response", new JsonObject { + { "StatusCode", (int)response.StatusCode}, + { "Headers", new JsonObject(FilterHeaders(response.Headers))}, + { "ContentHeaders", new JsonObject(FilterHeaders(response.Content.Headers))}, + { "Content", SerializeContent(response.Content, ref isBase64Response) }, + { "isContentBase64", isBase64Response }, + }} + }; + System.IO.File.WriteAllText(this.recordingPath, messages.ToString()); + } + + private JsonObject Load() + { + if (System.IO.File.Exists(this.recordingPath)) + { + try + { + return JsonObject.FromStream(System.IO.File.OpenRead(this.recordingPath)); + } + catch + { + throw new System.Exception($"Invalid recording file: '{recordingPath}'"); + } + } + + throw new System.ArgumentException($"Missing recording file: '{recordingPath}'", nameof(recordingPath)); + } + + public HttpResponseMessage LoadMessage(string rqKey) + { + var responses = Load(); + var message = responses.Property(rqKey); + + if (null == message) + { + throw new System.ArgumentException($"Missing Request '{rqKey}' in recording file", nameof(rqKey)); + } + + var sc = 0; + var reqMessage = message.Property("Request"); + var respMessage = message.Property("Response"); + + // --------------------------- deserialize response ---------------------------------------------------------------- + bool isBase64Response = false; + respMessage.BooleanProperty("isContentBase64", ref isBase64Response); + var response = new HttpResponseMessage + { + StatusCode = (HttpStatusCode)respMessage.NumberProperty("StatusCode", ref sc), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"), isBase64Response)) + }; + + foreach (var each in respMessage.Property("Headers")) + { + response.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + foreach (var frh in ForceResponseHeaders) + { + response.Headers.Remove(frh.Key); + response.Headers.TryAddWithoutValidation(frh.Key, frh.Value); + } + + foreach (var each in respMessage.Property("ContentHeaders")) + { + response.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + // --------------------------- deserialize request ---------------------------------------------------------------- + bool isBase64Request = false; + reqMessage.BooleanProperty("isContentBase64", ref isBase64Request); + response.RequestMessage = new HttpRequestMessage + { + Method = new HttpMethod(reqMessage.StringProperty("Method")), + RequestUri = new System.Uri(reqMessage.StringProperty("RequestUri")), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"), isBase64Request)) + }; + + foreach (var each in reqMessage.Property("Headers")) + { + response.RequestMessage.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + foreach (var each in reqMessage.Property("ContentHeaders")) + { + response.RequestMessage.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + return response; + } + + public async Task SendAsync(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + counter++; + var rqkey = $"{Description}+{Context}+{Scenario}+${request.Method.Method}+{request.RequestUri}+{counter}"; + + switch (Mode) + { + case MockMode.Record: + //Add following code since the request.Content will be released after sendAsync + var requestClone = request; + if (requestClone.Content != null) + { + requestClone = await request.CloneWithContent(request.RequestUri, request.Method); + } + // make the call + var response = await next.SendAsync(request, callback); + + // save the message to the recording file + SaveMessage(rqkey, requestClone, response); + + // return the response. + return response; + + case MockMode.Playback: + // load and return the response. + return LoadMessage(rqkey); + + default: + // pass-thru, do nothing + return await next.SendAsync(request, callback); + } + } + } +} diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Response.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Response.cs new file mode 100644 index 000000000000..42d900455d71 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Response.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + using System; + using System.Threading.Tasks; + public class Response : EventData + { + public Response() : base() + { + } + } + + public class Response : Response + { + private Func> _resultDelegate; + private Task _resultValue; + + public Response(T value) : base() => _resultValue = Task.FromResult(value); + public Response(Func value) : base() => _resultDelegate = () => Task.FromResult(value()); + public Response(Func> value) : base() => _resultDelegate = value; + public Task Result => _resultValue ?? (_resultValue = this._resultDelegate()); + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Serialization/JsonSerializer.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Serialization/JsonSerializer.cs new file mode 100644 index 000000000000..00a6dd9483c6 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Serialization/JsonSerializer.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal class JsonSerializer + { + private int depth = 0; + + private SerializationOptions options = new SerializationOptions(); + + #region Deserialization + + internal T Deseralize(JsonObject json) + where T : new() + { + var contract = JsonModelCache.Get(typeof(T)); + + return (T)DeserializeObject(contract, json); + } + + internal object DeserializeObject(JsonModel contract, JsonObject json) + { + var instance = Activator.CreateInstance(contract.Type); + + depth++; + + // Ensure we don't recurse forever + if (depth > 5) throw new Exception("Depth greater than 5"); + + foreach (var field in json) + { + var member = contract[field.Key]; + + if (member != null) + { + var value = DeserializeValue(member, field.Value); + + member.SetValue(instance, value); + } + } + + depth--; + + return instance; + } + + private object DeserializeValue(JsonMember member, JsonNode value) + { + if (value.Type == JsonType.Null) return null; + + var type = member.Type; + + if (member.IsStringLike && value.Type != JsonType.String) + { + // Take the long path... + return DeserializeObject(JsonModelCache.Get(type), (JsonObject)value); + } + else if (member.Converter != null) + { + return member.Converter.FromJson(value); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (member.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + private object DeserializeValue(Type type, JsonNode value) + { + if (type == null) throw new ArgumentNullException(nameof(type)); + + if (value.Type == JsonType.Null) return null; + + var typeDetails = TypeDetails.Get(type); + + if (typeDetails.JsonConverter != null) + { + return typeDetails.JsonConverter.FromJson(value); + } + else if (typeDetails.IsEnum) + { + return Enum.Parse(type, value.ToString(), ignoreCase: true); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (typeDetails.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + internal Array DeserializeArray(Type type, JsonArray elements) + { + var elementType = type.GetElementType(); + + var elementTypeDetails = TypeDetails.Get(elementType); + + var array = Array.CreateInstance(elementType, elements.Count); + + int i = 0; + + if (elementTypeDetails.JsonConverter != null) + { + foreach (var value in elements) + { + array.SetValue(elementTypeDetails.JsonConverter.FromJson(value), i); + + i++; + } + } + else + { + foreach (var value in elements) + { + array.SetValue(DeserializeValue(elementType, value), i); + + i++; + } + } + + return array; + } + + internal IList DeserializeList(Type type, JsonArray jsonArray) + { + // TODO: Handle non-generic types + if (!type.IsGenericType) + throw new ArgumentException("Must be a generic type", nameof(type)); + + var elementType = type.GetGenericArguments()[0]; + + IList list; + + if (type.IsInterface) + { + // Create a concrete generic list + list = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(elementType)); + } + else + { + list = (IList)Activator.CreateInstance(type); + } + + foreach (var value in jsonArray) + { + list.Add(DeserializeValue(elementType, value)); + } + + return list; + } + + #endregion + + #region Serialization + + internal JsonNode Serialize(object instance) => + Serialize(instance, SerializationOptions.Default); + + internal JsonNode Serialize(object instance, string[] include) => + Serialize(instance, new SerializationOptions { Include = include }); + + internal JsonNode Serialize(object instance, SerializationOptions options) + { + this.options = options; + + if (instance == null) + { + return XNull.Instance; + } + + return ReadValue(instance.GetType(), instance); + } + + #region Readers + + internal JsonArray ReadArray(IEnumerable collection) + { + var array = new XNodeArray(); + + foreach (var item in collection) + { + array.Add(ReadValue(item.GetType(), item)); + } + + return array; + } + + internal IEnumerable> ReadProperties(object instance) + { + var contract = JsonModelCache.Get(instance.GetType()); + + foreach (var member in contract.Members) + { + string name = member.Name; + + if (options.PropertyNameTransformer != null) + { + name = options.PropertyNameTransformer.Invoke(name); + } + + // Skip the field if it's not included + if ((depth == 1 && !options.IsIncluded(name))) + { + continue; + } + + var value = member.GetValue(instance); + + if (!member.EmitDefaultValue && (value == null || (member.IsList && ((IList)value).Count == 0) || value.Equals(member.DefaultValue))) + { + continue; + } + else if (options.IgnoreNullValues && value == null) // Ignore null values + { + continue; + } + + // Transform the value if there is one + if (options.Transformations != null) + { + var transform = options.GetTransformation(name); + + if (transform != null) + { + value = transform.Transformer(value); + } + } + + yield return new KeyValuePair(name, ReadValue(member.TypeDetails, value)); + } + } + + private JsonObject ReadObject(object instance) + { + depth++; + + // TODO: Guard against a self referencing graph + if (depth > options.MaxDepth) + { + depth--; + + return new JsonObject(); + } + + var node = new JsonObject(ReadProperties(instance)); + + depth--; + + return node; + } + + private JsonNode ReadValue(Type type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + var member = TypeDetails.Get(type); + + return ReadValue(member, value); + } + + private JsonNode ReadValue(TypeDetails type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + if (type.JsonConverter != null) + { + return type.JsonConverter.ToJson(value); + } + else if (type.IsArray) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateArray((string[])value); + case TypeCode.UInt16: return CreateArray((ushort[])value); + case TypeCode.UInt32: return CreateArray((uint[])value); + case TypeCode.UInt64: return CreateArray((ulong[])value); + case TypeCode.Int16: return CreateArray((short[])value); + case TypeCode.Int32: return CreateArray((int[])value); + case TypeCode.Int64: return CreateArray((long[])value); + case TypeCode.Single: return CreateArray((float[])value); + case TypeCode.Double: return CreateArray((double[])value); + default: return ReadArray((IEnumerable)value); + } + } + else if (value is IEnumerable) + { + if (type.IsList && type.ElementType != null) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateList(value); + case TypeCode.UInt16: return CreateList(value); + case TypeCode.UInt32: return CreateList(value); + case TypeCode.UInt64: return CreateList(value); + case TypeCode.Int16: return CreateList(value); + case TypeCode.Int32: return CreateList(value); + case TypeCode.Int64: return CreateList(value); + case TypeCode.Single: return CreateList(value); + case TypeCode.Double: return CreateList(value); + } + } + + return ReadArray((IEnumerable)value); + } + else + { + // Complex object + return ReadObject(value); + } + } + + private XList CreateList(object value) => new XList((IList)value); + + private XImmutableArray CreateArray(T[] array) => new XImmutableArray(array); + + #endregion + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Serialization/PropertyTransformation.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Serialization/PropertyTransformation.cs new file mode 100644 index 000000000000..f6e68422cf97 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Serialization/PropertyTransformation.cs @@ -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. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal class PropertyTransformation + { + internal PropertyTransformation(string name, Func transformer) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Transformer = transformer ?? throw new ArgumentNullException(nameof(transformer)); + } + + internal string Name { get; } + + internal Func Transformer { get; } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Serialization/SerializationOptions.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Serialization/SerializationOptions.cs new file mode 100644 index 000000000000..14c0257cace1 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Serialization/SerializationOptions.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal class SerializationOptions + { + internal static readonly SerializationOptions Default = new SerializationOptions(); + + internal SerializationOptions() { } + + internal SerializationOptions( + string[] include = null, + bool ingoreNullValues = false) + { + Include = include; + IgnoreNullValues = ingoreNullValues; + } + + internal string[] Include { get; set; } + + internal string[] Exclude { get; set; } + + internal bool IgnoreNullValues { get; set; } + + internal PropertyTransformation[] Transformations { get; set; } + + internal Func PropertyNameTransformer { get; set; } + + internal int MaxDepth { get; set; } = 5; + + internal bool IsIncluded(string name) + { + if (Exclude != null) + { + return !Exclude.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + else if (Include != null) + { + return Include.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return true; + } + + internal PropertyTransformation GetTransformation(string propertyName) + { + if (Transformations == null) return null; + + foreach (var t in Transformations) + { + if (t.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase)) + { + return t; + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/SerializationMode.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/SerializationMode.cs new file mode 100644 index 000000000000..5e82a363a8eb --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/SerializationMode.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + [System.Flags] + public enum SerializationMode + { + None = 0, + IncludeHeaders = 1 << 0, + IncludeReadOnly = 1 << 1, + + IncludeAll = IncludeHeaders | IncludeReadOnly + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/UndeclaredResponseException.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/UndeclaredResponseException.cs new file mode 100644 index 000000000000..7b6cc3ef1a7c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/UndeclaredResponseException.cs @@ -0,0 +1,112 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + using System; + using System.Net.Http; + using System.Net.Http.Headers; + using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions; + + public class RestException : Exception, IDisposable + { + public System.Net.HttpStatusCode StatusCode { get; set; } + public string Code { get; protected set; } + protected string message; + public HttpRequestMessage RequestMessage { get; protected set; } + public HttpResponseHeaders ResponseHeaders { get; protected set; } + + public string ResponseBody { get; protected set; } + public string ClientRequestId { get; protected set; } + public string RequestId { get; protected set; } + + public override string Message => message; + public string Action { get; protected set; } + + public RestException(System.Net.Http.HttpResponseMessage response) + { + StatusCode = response.StatusCode; + //CloneWithContent will not work here since the content is disposed after sendAsync + //Besides, it seems there is no need for the request content cloned here. + RequestMessage = response.RequestMessage.Clone(); + ResponseBody = response.Content.ReadAsStringAsync().Result; + ResponseHeaders = response.Headers; + + RequestId = response.GetFirstHeader("x-ms-request-id"); + ClientRequestId = response.GetFirstHeader("x-ms-client-request-id"); + + try + { + // try to parse the body as JSON, and see if a code and message are in there. + var json = Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode.Parse(ResponseBody) as Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject; + + // error message could be in properties.statusMessage + { message = If(json?.Property("properties"), out var p) + && If(p?.PropertyT("statusMessage"), out var sm) + ? (string)sm : (string)Message; } + + // see if there is an error block in the body + json = json?.Property("error") ?? json; + + { Code = If(json?.PropertyT("code"), out var c) ? (string)c : (string)StatusCode.ToString(); } + { message = If(json?.PropertyT("message"), out var m) ? (string)m : (string)Message; } + { Action = If(json?.PropertyT("action"), out var a) ? (string)a : (string)Action; } + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // couldn't get the code/message from the body response. + // In this case, we will assume the response is the expected error message + if(!string.IsNullOrEmpty(ResponseBody)) { + message = ResponseBody; + } + } +#endif + if (string.IsNullOrEmpty(message)) + { + if (StatusCode >= System.Net.HttpStatusCode.BadRequest && StatusCode < System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Request Error, Status: {StatusCode}"; + } + else if (StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Server Error, Status: {StatusCode}"; + } + else + { + message = $"The server responded with an unrecognized response, Status: {StatusCode}"; + } + } + } + + public void Dispose() + { + ((IDisposable)RequestMessage).Dispose(); + } + } + + public class RestException : RestException + { + public T Error { get; protected set; } + public RestException(System.Net.Http.HttpResponseMessage response, T error) : base(response) + { + Error = error; + } + } + + + public class UndeclaredResponseException : RestException + { + public UndeclaredResponseException(System.Net.Http.HttpResponseMessage response) : base(response) + { + + } + } +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Writers/JsonWriter.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Writers/JsonWriter.cs new file mode 100644 index 000000000000..b5cfba60f69c --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/Writers/JsonWriter.cs @@ -0,0 +1,223 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Web; + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json +{ + internal class JsonWriter + { + const string indentation = " "; // 2 spaces + + private readonly bool pretty; + private readonly TextWriter writer; + + protected int currentLevel = 0; + + internal JsonWriter(TextWriter writer, bool pretty = true) + { + this.writer = writer ?? throw new ArgumentNullException(nameof(writer)); + this.pretty = pretty; + } + + internal void WriteNode(JsonNode node) + { + switch (node.Type) + { + case JsonType.Array: WriteArray((IEnumerable)node); break; + case JsonType.Object: WriteObject((JsonObject)node); break; + + // Primitives + case JsonType.Binary: WriteBinary((XBinary)node); break; + case JsonType.Boolean: WriteBoolean((bool)node); break; + case JsonType.Date: WriteDate((JsonDate)node); break; + case JsonType.Null: WriteNull(); break; + case JsonType.Number: WriteNumber((JsonNumber)node); break; + case JsonType.String: WriteString(node); break; + } + } + + internal void WriteArray(IEnumerable array) + { + currentLevel++; + + writer.Write('['); + + bool doIndentation = false; + + if (pretty) + { + foreach (var node in array) + { + if (node.Type == JsonType.Object || node.Type == JsonType.Array) + { + doIndentation = true; + + break; + } + } + } + + bool isFirst = true; + + foreach (JsonNode node in array) + { + if (!isFirst) writer.Write(','); + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + WriteNode(node); + + isFirst = false; + } + + currentLevel--; + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + writer.Write(']'); + } + + internal void WriteIndent() + { + if (pretty) + { + writer.Write(Environment.NewLine); + + for (int level = 0; level < currentLevel; level++) + { + writer.Write(indentation); + } + } + } + + internal void WriteObject(JsonObject obj) + { + currentLevel++; + + writer.Write('{'); + + bool isFirst = true; + + foreach (var field in obj) + { + if (!isFirst) writer.Write(','); + + WriteIndent(); + + WriteFieldName(field.Key); + + writer.Write(':'); + + if (pretty) + { + writer.Write(' '); + } + + // Write the field value + WriteNode(field.Value); + + isFirst = false; + } + + currentLevel--; + + WriteIndent(); + + writer.Write('}'); + } + + internal void WriteFieldName(string fieldName) + { + writer.Write('"'); + writer.Write(HttpUtility.JavaScriptStringEncode(fieldName)); + writer.Write('"'); + } + + #region Primitives + + internal void WriteBinary(XBinary value) + { + writer.Write('"'); + writer.Write(value.ToString()); + writer.Write('"'); + } + + internal void WriteBoolean(bool value) + { + writer.Write(value ? "true" : "false"); + } + + internal void WriteDate(JsonDate date) + { + if (date.ToDateTime().Year == 1) + { + WriteNull(); + } + else + { + writer.Write('"'); + writer.Write(date.ToIsoString()); + writer.Write('"'); + } + } + + internal void WriteNull() + { + writer.Write("null"); + } + + internal void WriteNumber(JsonNumber number) + { + if (number.Overflows) + { + writer.Write('"'); + writer.Write(number.Value); + writer.Write('"'); + } + else + { + writer.Write(number.Value); + } + } + + internal void WriteString(string text) + { + if (text == null) + { + WriteNull(); + } + else + { + writer.Write('"'); + + writer.Write(HttpUtility.JavaScriptStringEncode(text)); + + writer.Write('"'); + } + } + + #endregion + } +} + + +// TODO: Replace with System.Text.Json when available diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/delegates.cs b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/delegates.cs new file mode 100644 index 000000000000..0b328f813449 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/generated/runtime/delegates.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData=System.Func; + + public delegate Task SendAsync(HttpRequestMessage request, IEventListener callback); + public delegate Task SendAsyncStep(HttpRequestMessage request, IEventListener callback, ISendAsync next); + public delegate Task SignalEvent(string id, CancellationToken token, GetEventData getEventData); + public delegate Task Event(EventData message); + public delegate void SynchEvent(EventData message); + public delegate Task OnResponse(Response message); + public delegate Task OnResponse(Response message); +} \ No newline at end of file diff --git a/swaggerci/recoveryservicesbackup.DefaultTag/readme.md b/swaggerci/recoveryservicesbackup.DefaultTag/readme.md new file mode 100644 index 000000000000..c56fd5372945 --- /dev/null +++ b/swaggerci/recoveryservicesbackup.DefaultTag/readme.md @@ -0,0 +1,10 @@ +### AutoRest Configuration +> see https://aka.ms/autorest + +``` yaml +require: + - $(this-folder)/../../tools/SwaggerCI/readme.azure.noprofile.md + - $(this-folder)/../../../azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/readme.md +try-require: + - $(this-folder)/../../../azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/readme.powershell.md +```